StevenLooman / magik-tools

Sonar Magik plugin
GNU General Public License v3.0
18 stars 10 forks source link

Reading configuration produces weird output #111

Closed sebastiaanspeck closed 2 weeks ago

sebastiaanspeck commented 3 weeks ago

In my current folder I have the linter JAR and a magik-lint.properties (which gets read according to the logging), but the output shows me there is no disabled check.

This is my magik-lint.properties:

disabled=file-method-count,method-line-count,no-self-use,type-doc,variable-declaration-usage-distance
$ java -jar magik-lint-0.10.1.jar --debug --show-checks
2024-11-09 11:14:30 FINEST  nl.ramsolutions.sw.ConfigurationLocator : Search path: C:\Users\sebastiaan.speck\AppData\Roaming\.emacs.d\magik-lint
2024-11-09 11:14:30 FINEST  nl.ramsolutions.sw.ConfigurationLocator : Trying to get config at (1): C:\Users\sebastiaan.speck\AppData\Roaming\.emacs.d\magik-lint\magik-lint.properties
2024-11-09 11:14:30 FINE    nl.ramsolutions.sw.MagikToolsProperties : Reading configuration from: C:\Users\sebastiaan.speck\AppData\Roaming\.emacs.d\magik-lint\magik-lint.properties
Enabled checks:
- commented-code (Remove commented code)
- duplicate-method-in-file (Duplicate method definition in file)
- empty-block (Block is empty and can be removed)
...
- variable-declaration-usage-distance (Distance between variable definition and usage)
- variable-naming (Give variables a proper descriptive name)
- warned-call (Warned call)
Disabled checks:

If I explicitly send the magik-lint.properties with --rcfile, the output differs:

$ java -jar magik-lint-0.10.1.jar --debug --show-checks --rcfile magik-lint.properties
2024-11-09 11:14:40 FINE    nl.ramsolutions.sw.MagikToolsProperties : Reading configuration from: C:\Users\sebastiaan.speck\AppData\Roaming\.emacs.d\magik-lint\magik-lint.properties
2024-11-09 11:14:40 FINE    nl.ramsolutions.sw.MagikToolsProperties : Reading configuration from: C:\Users\sebastiaan.speck\AppData\Roaming\.emacs.d\magik-lint\magik-lint.properties
2024-11-09 11:14:40 FINE    nl.ramsolutions.sw.MagikToolsProperties : Reading configuration from: C:\Users\sebastiaan.speck\AppData\Roaming\.emacs.d\magik-lint\magik-lint.properties
Enabled checks:
- commented-code (Remove commented code)
- duplicate-method-in-file (Duplicate method definition in file)
- empty-block (Block is empty and can be removed)
...
- variable-count (Method/procedure contains too many variables)
- variable-naming (Give variables a proper descriptive name)
- warned-call (Warned call)
Disabled checks:
- file-method-count (File has too many methods defined)
- method-line-count (Method/procedure is too long)
- no-self-use (No usage of _self)
- type-doc (Method is missing documentation)
- variable-declaration-usage-distance (Distance between variable definition and usage)
StevenLooman commented 2 weeks ago

Should be fixed with 4ea9bdb479e898cee0bb6a69aed57e26ad955540.

sebastiaanspeck commented 2 weeks ago

Should be fixed with 4ea9bdb.

I can confirm it is fixed.