Consistent Coding Style (for people who modify the vscode-go source code) #1214
pjweinb
started this conversation in
Discussions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The vscode-go code base (more than 13,000 lines of Typescript) suffers from an inconsistent coding style. One approach would be to adopt a standard set of eslint rules, perhaps those from gts (https://github.com/google/gts). Many of the changes are purely cosmetic and could be made automatically. The cosmetic changes include consistent layout and use of whitespace, consistent use of semicolons, removing unneeded return statements, and some others.
After making these changes there are still eslint complaints, Some of these are trivial to deal with, such as defining variables in cases (the problem is that their scope is the whole switch), but the code heavily depends on the 'any' type. The typing should be fixed, but until then the errors can be suppressed by putting special comments in the affected files. This has the advantage that the problems can later be fixed incrementally.
Probably the best time to do this is right after a release.
Comments welcome.
Beta Was this translation helpful? Give feedback.
All reactions