Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd code quality metrics to standard #174
Comments
This comment has been minimized.
This comment has been minimized.
|
Fortunately |
jprichardson
closed this
Jun 25, 2015
This comment has been minimized.
This comment has been minimized.
|
Some items I mentioned here are quantifiable metrics.
What I suggest you to do, is to create levels: |
ghost
changed the title
Your standard is impractical
Add code quality metrics to standard
Apr 23, 2017
This comment has been minimized.
This comment has been minimized.
zanona
commented
Dec 11, 2017
|
@arboreal84, by any chance would you be able to share the ESLint rules for your suggestion? |
This comment has been minimized.
This comment has been minimized.
|
(Well first of all, sorry for the initial tone, edited the message).
Now there's also "prefer constants", which will let you know if a variable can be turned into a To my knowledge there's no static analysis for numbers, dates, etc. ConsThe cons of this approach is: there can be bikeshedding about the thresholds, since this could be read as a vague predicate. e.g: how many statements per line are allowed, how much cyclomatic complexity, etc. It can be initially set very high, to block the unreasonably complex code. Then probably find a balance. |
This comment has been minimized.
This comment has been minimized.
zanona
commented
Dec 12, 2017
|
Thanks a lot for sharing those @arboreal84, it's super helpful. The only way I can think of is to have a |
This comment has been minimized.
This comment has been minimized.
|
Well, as @jprichardson mentioned, the objective of That's why I suggested establishing levels,
There's a lot of room for improvement with it comes to coding standards and static analysis. But I guess this will most likely be up to another project. Thanks for following up this discussion, @zanona. |
ghost commentedJun 25, 2015
•
edited by ghost
It does not mention anything about:
In short, people can respect your standard and still produce code that is hard to maintain.
standardemphasizes whitespace but not true readability.(Disclaimer: edited for better tone)