1

I am working on a custom findbugs plugin which finds the variable naming errors in java classses.

For example Button variables must starts with btn* and if not, report it.

Button btnSave; // It's ok
Button close; //Report it, not starts with btn

I have been working on this project for days. I can detect method naming errors, method return value errors etc. But I can not detect -this simple- variable naming errors. I tried many code pieces and the findbugs documentation is not helpful on this case.

In addition, I can not debug my custom plugin project and every changes steal my time.

Thanks.

Tugrul
  • 1,760
  • 4
  • 24
  • 39

1 Answers1

3

FindBugs is a code analyzer that operates on bytecode. Variable names are a property of the source code.

You might be better off with a different static analyzer such as PMD that operates on source code.

See also What are the differences between PMD and FindBugs?

Community
  • 1
  • 1
shoover
  • 3,071
  • 1
  • 29
  • 40