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

[WIP] Implement SA1138: Indent elements correctly #2034

Open
wants to merge 47 commits into
base: master
Choose a base branch
from

Conversation

sharwell
Copy link
Member

@sharwell sharwell commented Jan 9, 2016

Fixes #2025

@sharwell sharwell self-assigned this Jan 9, 2016
@sharwell sharwell force-pushed the fix-2025 branch 2 times, most recently from 1757562 to 789b06d Compare January 9, 2016 22:16
@codecov-io
Copy link

Current coverage is 93.38%

Merging #2034 into master will decrease coverage by -0.03% as of f3bbcd4

@@            master   #2034   diff @@
======================================
  Files          564     568      +4
  Stmts        35663   37234   +1571
  Branches      2292    2389     +97
  Methods                           
======================================
+ Hit          33313   34770   +1457
- Partial        752     777     +25
- Missed        1598    1687     +89

Review entire Coverage Diff as of f3bbcd4

Powered by Codecov. Updated on successful CI builds.

@sharwell
Copy link
Member Author

sharwell commented Jan 9, 2016

📝 Currently SA1138UnitTests.TestAttributeListAsync demonstrates an incorrect indentation behavior that should be fixed.

@sharwell
Copy link
Member Author

Note for myself: things noticed during testing that need to be fixed:

  • Attributes are indented too far
  • Contents of nested using indented "strangely"
  • Contents of nested if / else if indented too far
  • Indentation of while token of a do statement isn't checked if body is not a block

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.
@janaagaard75
Copy link

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.)

@zvonimir
Copy link

Hi. Any updates on this pull request? It would be great to land this one since it is really important for code readability. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement SA1138: Indent elements correctly
4 participants