I expect the rule CNT_ROUGH_CONSTANT_VALUE for constants and variables.
At the moment the rule only works for literals in calculations, e.g.:
circumference = diameter * 3.141;
will be detected as expected.
If I declare a constant (or variable) like
public static final double MY_PI = 3.141;
this is not detected.
Do you mean that you declare the constant, but don't use it? Yes, such cases are not detected. However if you write later
Then it should warn you.
I think if constant is declared, but not used anywhere, it's probably ok not to report this case.