Replies: 4 comments 1 reply
-
Greetings @BasF0 ,
There are rules which support different options. For example all the of the case rules you can choose either You can use the
I agree with you on this point. When I first started I did not consider the negative option as this tool was geared toward my style of code. As time went on and other people started using it, I started adding options to rules to make it more usable.
Obviously some rules would be easier to implement both the
I would encourage you to create issues for any changes to rules you would like to see or if there is a rule that does not exist. I can then schedule it for implementation. Regards, --Jeremy |
Beta Was this translation helpful? Give feedback.
-
Thanks for the kind words. It is hard to know how much value people find in this effort.
If you have any ideas, or said "I wish...", just let me know. We can discuss it and see what it takes to implement it. |
Beta Was this translation helpful? Give feedback.
-
Hey @BasF0, Just wanted to let you know I was updating rule constant_012 and I used your idea for implementing both 'true', 'false' and 'ignore'. The |
Beta Was this translation helpful? Give feedback.
-
I noticed an @ in issue #504 as well yeah. I'm using stable so not looking at the latest changes or the source, but I was wondering what a good way of implementing things would be. I guess you're figuring that out as well.. I thought, if similar rules have an attribute that is an enum, you prevent adding many different attributes. |
Beta Was this translation helpful? Give feedback.
-
As I understand it, we can only enable/disable rules. If we want the opposite result of that rule we can't have it. I think this can still result in inconsistent code. Take if_002 just as an example:
With the rule we can enforce brackets. But what if our style is to not have brackets ? We can disable the rule, but then any if statements that do still pass the style check. The result being inconsistent code...
if-002 was just an example but I think this is a more fundamental design choice that is a valid one for most 'rules'. For boolean things, shouldn't we be able to chose that the rule must be 'true, false, ignore' instead of only 'enable, disable' ?
As an example for non-boolean rules, for example a number of rules enforce 1 space between things. Instead of either enabling that rule, or disabling it, shouldn't we be able to chose '0, 1, ..., ignore' instead of enable/disable ?
Beta Was this translation helpful? Give feedback.
All reactions