Showing content from https://github.com/pmd/pmd/issues/2322 below:
[apex] New Rules brainstorming · Issue #2322 · pmd/pmd · GitHub
I collected ideas for new rules in the community and need to collect them first before I can detail them in single issues:
Robert Sösemann
Daniel Ballinger @FishOfPrey
- null checking for Booleans, integers, etc... If they are used in if conditions it would be common to do something like if(someBoolean) {} and miss the null case that Apex permits.
- Shadowing any system namespace or classes
- Variables that are only ever assigned but never otherwise used
- Putting multiple statements on the single line. This is less than ideal for code coverage calculations.
- People using =: as an operator in Apex SOQL variable binding. It leads to confusion. The : should be associated with the variable being bound. Not the =.
Diéffrei Quadros @dieffrei
- Avoid leaving TODO/FIXME comments in code
- Avoid Literals in If Condition
CodeScan rules I like
https://docs.google.com/spreadsheets/d/1JRsE7vpmIhEtJRjWhLGcTmsUb3O6jfUAvOjgQnIWsJ4/edit?usp=sharing
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4