Ingore Fields during inspection

We put tags in our compiled byte code like

private static final mks_id = "$Id:";

Then our vcs (mks obviously) will usert version numbers when we check in. This allows us to see what version a specific .class file is. This is a pretty common practice, sometimes people put copyright notices ect into their compiled code.

We obviously never actually reference this field, so is there a way for me to tell idea to quick complaining about any variable named mks_id ???

4 comments
Comment actions Permalink

You may add such field to entry points when unused code inspection is shown
up.

--

Best regards,
Maxim Shafirov
JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"


"charles decroes" <spam@decroes.com> wrote in message
news:12187209.1057786439559.JavaMail.javamailuser@localhost...

We put tags in our compiled byte code like

>

private static final mks_id = "$Id:";

>

Then our vcs (mks obviously) will usert version numbers when we check in.

This allows us to see what version a specific .class file is. This is a
pretty common practice, sometimes people put copyright notices ect into
their compiled code.
>

We obviously never actually reference this field, so is there a way for me

to tell idea to quick complaining about any variable named mks_id ???


0
Comment actions Permalink

Maxim Shafirov wrote:

> You may add such field to entry points when unused code
> inspection is shown up.


Great. I didn't know you could manually add entry points this way.
(here is why : http://www.intellij.net/tracker/idea/viewSCR?publicId=14031)


Now, I wish I could also exclude some entry points the same way. That
would solve
http://www.intellij.net/tracker/idea/viewSCR?publicId=2740

, that I personnally find a real major pain in the b..t, that also hurts
my feelings.
Currently, the only way to go around this problem would be to implement
toString() with reflexion !! Ouch.


Alain

0
Comment actions Permalink

so if you have that same field in every class I would have to add an entry point for every single class?

0
Comment actions Permalink

Unfortunately yes. Seems like we need some pattern support for entry points.

--

Best regards,
Maxim Shafirov
JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"


"charles decroes" <spam@decroes.com> wrote in message
news:15202739.1057838490318.JavaMail.itn@is.intellij.net...

so if you have that same field in every class I would have to add an entry

point for every single class?


0

Please sign in to leave a comment.