You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on the number of comments on this PR that are about basic style and code formatting, I was surprised to see that there are no analyzers (or equivalent) set up to automatically check for issues like white-space use or naming conventions.
Is there a reason these can't be added?
There would be two immediate benefits:
Code would be formatted consistently which helps with reading, understanding, and maintenance.
It would mean code reviews aren't distracted by trivial issues and can focus on the code. This can reduce the number of code comments and stop valuable issues becoming lost among multiple discussions about blank lines.
The down-side of adding these automatic formatting checks may be that existing code doesn't meet any set of rules and so turning it on would flag a large number of issues.
If that's the case the rules could be turned on (or analyzers added) when a project is otherwise being changed (or added) so not everything is done at once.
Alternatively, formatting inconsistencies are normally easy to fix and so it may only take a few hours (based on my past experiences with other large projects) to address what's found as tooling can normally automatically fix most of them and so it's just exceptions that need manual intervention or review.
It's not the most exciting work to do but it brings value over time.
Existing code coverage should make this a low risk change.
The text was updated successfully, but these errors were encountered:
@ranjeshj is working on getting clang-tidy and clang-format enabled to run on the codebase and I think that should help for C++. MSVC just doesn't have a good linter as far as we've seen.
For C# there's the new editorconfig stuff that we have set up and should be taking effect in C# files. If there's more stylistic stuff for C# that needs to be added there we can do it. And then if something like StyleCop would help go even further we can run that too. But I haven't seen as much nit-picking in C# so i think the editorconfig mostly is doing its job.
Based on the number of comments on this PR that are about basic style and code formatting, I was surprised to see that there are no analyzers (or equivalent) set up to automatically check for issues like white-space use or naming conventions.
Is there a reason these can't be added?
There would be two immediate benefits:
The down-side of adding these automatic formatting checks may be that existing code doesn't meet any set of rules and so turning it on would flag a large number of issues.
If that's the case the rules could be turned on (or analyzers added) when a project is otherwise being changed (or added) so not everything is done at once.
Alternatively, formatting inconsistencies are normally easy to fix and so it may only take a few hours (based on my past experiences with other large projects) to address what's found as tooling can normally automatically fix most of them and so it's just exceptions that need manual intervention or review.
It's not the most exciting work to do but it brings value over time.
Existing code coverage should make this a low risk change.
The text was updated successfully, but these errors were encountered: