-
Notifications
You must be signed in to change notification settings - Fork 73
Console,Core: print number of rules before linting #833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Note that the hints are counted as single rule. |
|
Why is the total 96 instead of 94? (Last rule added was FL0094) |
Hints are counted as one rule. Also there is a field I wonder if it's better to only include fields that have type |
|
Sorry I'm not a fan of the Reflection approach to count all rules. If you're already not needing reflection to count the enabled rules, why not use the logic that must be filtering the rules by config.Enabled or not (which end up in LoadedRules type) to get a total from there? |
Because LoadedRules include only enabled rules. Information about any disabled rules is lost in the process of creating it. And I'm hesitant to make any major changes in Configuration.fs because it will mess up with PRs that are currently open but haven't been merged yet. |
I'm asking you to modify that process so that it is not lost anymore.
Please don't. |
We also have to take in account that rule NonPublicValuesNames was removed, so when I said 94 above, I meant 93. |
I meant, do not be hesitant please. A change to just count things is not going to be very disruptive; fixing conflicts later should be very easy. |
a2ec1bc to
825de58
Compare
|
@knocte Changed how rules are counted. The final result is 95 rules, because deleted rule is still included in all rules list (but raises an exception when enabled) and Hints are counted as one rule. |
|
Let's squash commits into 1. |
Print number of enabled/total/disabled rules in config before linting.
1719f73 to
76864e2
Compare
Squashed. |
|
See how much simpler & cleaner the code of this PR is now without reflection? We have to be careful about needlessly growing the complexity of the codebase. |
Print number of enabled/total/disabled rules in config before linting.