-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
csharpier does not respect editorconfig specific c# rules #1214
Comments
I've narrowed this down to CSharpier not working with braces in the glob, which means a pattern like this will not work For this example
According to the editorconfig spec, the most recent rule is what should be used. Which would result in an indent size of 4. Which means for this example, indent size of 3 should be used for
|
…orconfig needs. Customized GlobMatcher to allow single brace sets like [*.{cs}] and treat them like [*.cs] closes #1214
I agree sticking to the editorconfig specification is the way to go |
* Pull in new way to parse globs, dotnet.glob did not support what editorconfig needs. Customized GlobMatcher to allow single brace sets like [*.{cs}] and treat them like [*.cs] closes #1214 * Make these internal
Issue
Csharpier fails to adhere to the specified guidelines for .cs files.
.editorconfig
Bonus: We do use
[*.{cs,csx}]
and[*.{cs}]
sometimes. It would be nice if the "more specific" rule takes precedence. eg[.{cs}]
is used ultimately for formatting.But probably an override mechanism is necessary: base editor config rules + override with
[*.{cs,csx}]
+ override with[*.{cs}]
, which results in formatting with indent_size = 4Example:
This example results in formatting with indent_size = 4
Input:
Output:
Expected behavior:
Csharpier does not change Input. Formatting Input results in Input
The text was updated successfully, but these errors were encountered: