-
Notifications
You must be signed in to change notification settings - Fork 510
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
[WIP] Implement SA1138: Indent elements correctly #2034
base: master
Are you sure you want to change the base?
Conversation
1757562
to
789b06d
Compare
Current coverage is
|
📝 Currently |
Note for myself: things noticed during testing that need to be fixed:
|
Currently this code fix only corrects SA1137, but the implementation is general enough to support other types of indentation corrections in the future.
* Fix handling of consecutive labels * Fix analysis of nodes which are not indented * Fix logic error in code fix
* Fix misuse of immutable collections API
* Ignore leading attribute lists when analyzing other element kinds
* Attribute lists are now evaluated along with siblings of their parents
Also fixes a bug where some lines would get duplicate diagnostics
This change will make it much easier to run a complete set of tests using different indentation configurations.
This method doesn't produce an indentation string for an arbitrary width, which makes it not suitable for general indentation adjustments. Renaming the method allows for the creation of a more general GenerateIndentationString method later.
This change allows for for accurate indentation adjustments of single code elements which span multiple lines. Since the fix all provider has not been updated to account for the new behavior, it is disabled for now.
What's the status of this pull request? I can see that there are a bunch of conflicting files, but is there anything else that needs to be done, beside resolving these conflicts? (I have no idea how easy of difficult it would be to resolve these conflicts.) |
Hi. Any updates on this pull request? It would be great to land this one since it is really important for code readability. Thanks! |
Fixes #2025