dlang-community / D-Scanner

Swiss-army knife for D source code
Boost Software License 1.0
242 stars 80 forks source link

dscanner.ini settings get ignored when adding ModuleFilters #940

Open SingingBush opened 1 year ago

SingingBush commented 1 year ago

The following works fine for all modules:

[analysis.config.StaticAnalysisConfig]
undocumented_declaration_check="disabled"

but if I add another setting specific to a module, with ModuleFilters before StaticAnalysisConfig, then the undocumented_declaration_check is somehow enabled again.

[analysis.config.ModuleFilters]
could_be_immutable_check="+myproject.app,-myproject.tests"

[analysis.config.StaticAnalysisConfig]
undocumented_declaration_check="disabled"

If I put StaticAnalysisConfig before the ModuleFilters then the undocumented_declaration_check does get disabled as expected but the could_be_immutable_check is still being checked against myproject.tests when it shouldn't be.

[analysis.config.StaticAnalysisConfig]
undocumented_declaration_check="disabled"

[analysis.config.ModuleFilters]
could_be_immutable_check="+myproject.app,-myproject.tests"