I'm using Windows and Eclipse 3.7 Classic with ADT plugin for Android development.
I've just installed FindBugs and it have found a bug in auto-generated R.java class.
I want to exclude this class from FindBugs checks.
I've found that I can define exclude filters for FindBugs in xml file, so I've created a file D:\Projects\eclipse\FindBugsExculde.xml with text
<FindBugsFilter>
<Match>
<Class name="com.android.demo.notepad3.R$attr" />
</Match>
</FindBugsFilter>
I've added this file to Eclipse -> Window -> Preferences -> Java -> FindBugs -> Filter files -> "Add..." button near the "Exclude filter files" section.
But when I right-click on my project and select "Find Bugs" -> "Find Bugs" I still see the error
The class name com.android.demo.notepad3.R$attr doesn't start with an upper case letter
I have even tried to replace
<Class name="com.android.demo.notepad3.R$attr" />
with
<Class name="~.*" />
but still the error is there.
I tried to restart Eclipse - no luck. I even thought that maybe there is a Bug in FindBugs so it doesn't use the file specified but Procmon.exe from SysinternalsSuite shows that it do use it each time I execute FindBugs:
ProcessName Operation Path Result
javaw.exe QueryOpen D:\Projects\eclipse\FindBugsExculde.xml SUCCESS
javaw.exe QueryOpen D:\Projects\eclipse\FindBugsExculde.xml SUCCESS
javaw.exe CreateFile D:\Projects\eclipse\FindBugsExculde.xml SUCCESS
javaw.exe CreateFile D:\Projects\eclipse\FindBugsExculde.xml SUCCESS
javaw.exe QueryFileInternalInformationFile D:\Projects\eclipse\FindBugsExculde.xml SUCCESS
javaw.exe CloseFile D:\Projects\eclipse\FindBugsExculde.xml SUCCESS
javaw.exe ReadFile D:\Projects\eclipse\FindBugsExculde.xml SUCCESS
javaw.exe CloseFile D:\Projects\eclipse\FindBugsExculde.xml SUCCESS
What am I doing wrong? Please help me!