Conversation
There was a problem hiding this comment.
Pull request overview
Updates repository-wide formatting defaults and documents new style guidelines (encoding, line endings, and line length) while keeping C# indentation at 4 spaces.
Changes:
- Update
.editorconfigdefaults (2-space indent, LF, UTF-8, trim trailing whitespace) with explicit overrides for C# and Windows scripts. - Refresh
policy/coding-style.mdto add new repo-wide text file rules and wrap lines to ~100 chars. - Remove redundant file-type-specific
.editorconfigsections now covered by the new defaults.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| policy/coding-style.md | Adds/rewraps guidelines (UTF-8/LF, 100-char lines) and reformats the rules list. |
| .editorconfig | Changes default formatting settings and simplifies per-file-type overrides (keeps C# at 4 spaces, Windows scripts CRLF). |
.editorconfig
Outdated
| [*.{yml,yaml}] | ||
| indent_size = 2 | ||
| # Use Unix-style line endings. | ||
| end_of_line = lf |
There was a problem hiding this comment.
I think most of our files are already LF, so this seemed to make sense. VSCode won't change an existing file automatically.
There was a problem hiding this comment.
This one messes with things... Git default behavior at install on Windows is to checkout crlf and check in lf. Changing this at the IDE level will cause a flurry of warnings when commiting, iirc. While I agree, having consistent line ending is a good thing at the repo level, the conflict between IDE (editorconfig) and scm (git) will make a mess of things for Windows users.
For the record, you see that our files are LF already because you're working from linux :)
There was a problem hiding this comment.
Ok I will remove it and let individual devs decide based on their git and IDE config.
benrr101
left a comment
There was a problem hiding this comment.
Provisionally approving it...
664a199
Changes to default settings:
C# specific:
Windows scripts:
Removed sections:
Coding style:
New guidelines added:
Formatting improvements: