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

Can't suppress WHITESPACE warnings #2205

Open
nadav-kooply opened this issue Aug 6, 2024 · 2 comments
Open

Can't suppress WHITESPACE warnings #2205

nadav-kooply opened this issue Aug 6, 2024 · 2 comments

Comments

@nadav-kooply
Copy link

I've tried adding an empty .editorconfig file in order to slowly add rules to an existing project.
When testing it with --severity error --verify-no-changes I get WHITESPACE errors for lines with trailing whitespace.
When I try setting trim_trailing_whitespace to false or unset I still get those errors.
I've tried disabling all sorts of dotnet_diagnostic codes like:

dotnet_diagnostic.IDE0055.severity = none
dotnet_diagnostic.SA1028.severity = none
dotnet_diagnostic.CA1062.severity = none
dotnet_diagnostic.CA1801.severity = none
dotnet_diagnostic.CA1822.severity = none
dotnet_diagnostic.SA1000.severity = none
dotnet_diagnostic.SA1001.severity = none
dotnet_diagnostic.SA1005.severity = none
dotnet_diagnostic.SA1025.severity = none

But nothing seems to work.
How can I disable this rule?

@JoeRobich
Copy link
Member

dotnet-format uses the Roslyn formatter to format whitespace and the Roslyn formatter always trims unnecessary whitespace from the ends of lines. There is no setting to control this behavior.

@nadav-kooply
Copy link
Author

Okay.. that's kinda strange that it can't be turned off. Are there other similar settings that are hard-coded and can't be disabled?

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

2 participants