Open heaths opened 2 months ago
https://github.com/editorconfig-checker/editorconfig-checker might be an option. They also have a GitHub Actions action: https://github.com/marketplace/actions/editorconfig-checker-action
We can add that. Currently, .editorconfig officially supports a very limited set of 7 rules:
If combined with VSCode's format-on-save, we'll want to ensure that our CI linting tool and VSCode are using the same rules. I believe the formatting rules in VSCode are a superset of the editorconfig rules, so VSCode formatting should pass editorconfig checks.
We also should center on VSCode. Lots of editors support .editorconfig out of the box like helix or VS, or with a plugin like vim or VSCode. Per our conversation over Teams, if prettier support reading from .editorconfig, we could use that and have it "inherit" those settings instead of duplicating them.
Ideally it can also enforce headers, which are a requirement for source files if supported (which they are for Rust).
We should find or write a way to enforce
.editorconfig
rules in CIs to keep code consistent.rustfmt
works great for.rs
files but that seems to be its limit._Originally posted by @heaths in https://github.com/Azure/azure-sdk-for-rust/pull/1724#discussion_r1727966285_