Skip to content
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

Editorconfig rules look unusual, aren't being followed consistently #1125

Open
EricDunsworth opened this issue Mar 19, 2024 · 0 comments
Open

Comments

@EricDunsworth
Copy link
Member

EricDunsworth commented Mar 19, 2024

The repo's .editorconfig file is currently kind of strange.

It looks like it started out as a copy of WET's .editorconfig file, but was never revised to align with the CDTS repo's structure and intended coding styles. For example, several rules cover file formats and paths that don't exist in this project.

#366 also appears to have changed the default rule's indent_style property from tab to space - without revising all files accordingly. End result is that a few hundred files are currently using tab indents, while a few hundred others are using space indents :S.

To resolve this, I'd recommend the following:

  1. Determine what kind of coding styles the CDTS wants to move forward with (1 tab vs 2 spaces vs 4 spaces, etc...)
  2. Revise the .editorconfig file's rules accordingly:
    • Base rules on desired coding styles (refer to EditorConfig's site for more info)
    • Exempt third party files that don't follow any rules (via unset)
    • Remove irrelevant rules/properties/etc
  3. Use IDEs with built-in support or plugins for .editorconfig
  4. Revise all of the repo's files to follow the revised .editorconfig rules (might be ways of automating this)
  5. Maybe add CI checks to enforce .editorconfig rules going forward (to prevent PRs that break the rules from being merge-able)

Thanks :)!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant