-
Notifications
You must be signed in to change notification settings - Fork 179
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
Improve PHPCS configuration #12729
Comments
The following are some of the rules I would look at implementing. Some good examples to follow https://github.com/wearerequired/coding-standards/blob/master/Required/ruleset.xml |
Also for reference. #12760 |
Soo many rules! From the above we already use a few, so that's good. The cognitive complexity rule definitely needs tweaking There's even more I find useful. For example:
I have some WIP config locally including a mix of these rules, will refine it in the new year. |
I have tried to implement this rule, but it resulted in many many false positive and added more overhead than value. I would recommend not using this lint rule. |
|
I really like this rule. I have put together a demo PR - #12912 |
Complexity Cognitive seems very similar to Cyclomatic Complexity. After setting up the rule, there are lots of places where the rule would have to be ignored. Examples of code that is marked as complex.
The lint has some use. If you set the value to say 25. This results in the following lints errors.
These are seems valid, as they are all complex. |
Yes, they're similar.
Yeah I noticed the same in my WIP config I mentioned further above. |
I think ticket is good to be closed now. |
Task Description
We discussed potentially enabling many more rules from https://github.com/slevomat/coding-standard
Let's go through them to see which ones are useful for the project
The text was updated successfully, but these errors were encountered: