jborgers / PMD-jPinpoint-rules

PMD rule set for responsible Java and Kotlin coding: performance, sustainability, multi-threading, data mixup and more.
Apache License 2.0
43 stars 10 forks source link

Fix Request: extend rule ImproperVariableName #323

Closed jborgers closed 2 months ago

jborgers commented 3 months ago

Add improper names, based on seen: VALUE_127 VAL_127 INT_5 INTEGER_5

jborgers commented 3 months ago

examples:

  int VAL_127 = 127; //bad #323
    String VALUE_127 = 127; //bad #323
    int VAL_ONE_TWO_SEVEN; // bad #323
    int INT_5 = 5; //bad #323
    int INTEGER_5 = 5; //bad #323
    long long_7 = 7; //bad #323
    int NUMBER_7 = 7; //bad #323
    int NUM_7 = 7; // bad #323
    int TWENTY_EIGHT; // bad #323
jborgers commented 2 months ago

false positives:

class Mapper {
    String key; // good
    String value; // good
    int val; // good
}