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

Move indentation options from workspace settings to stylecop.json #2039

Merged
merged 5 commits into from
Jan 13, 2016

Conversation

sharwell
Copy link
Member

  • Move indentation options from workspace settings to stylecop.json
  • Disable SA1027 when useTabs is true

@codecov-io
Copy link

Current coverage is 93.36%

Merging #2039 into master will not affect coverage as of a1d6d19

@@            master   #2039   diff @@
======================================
  Files          564     564       
  Stmts        35640   35663    +23
  Branches      2289    2293     +4
  Methods                          
======================================
+ Hit          33275   33295    +20
- Partial        752     753     +1
- Missed        1613    1615     +2

Review entire Coverage Diff as of a1d6d19

Powered by Codecov. Updated on successful CI builds.

public int TabSize =>
this.tabSize;

public bool? IndentBlock =>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ Should we leave the last four settings here for SA1138 (#2034)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

➡️ I went ahead and restricted this to the settings which are actually used currently.


var newSyntaxRoot = syntaxRoot.ReplaceTokens(tokenReplacements.Keys, (originalToken, rewrittenToken) => tokenReplacements[originalToken]);
return document.WithSyntaxRoot(newSyntaxRoot);
}

private static Dictionary<SyntaxToken, SyntaxToken> GenerateBraceFixes(Document document, ImmutableArray<SyntaxToken> braceTokens)
private static Dictionary<SyntaxToken, SyntaxToken> GenerateBraceFixes(Document document, IndentationSettings indentationSettings, ImmutableArray<SyntaxToken> braceTokens, CancellationToken cancellationToken)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ Is the cancellationToken parameter unnecessary, because it isn't used anywhere in the method.

@vweijsters
Copy link
Contributor

👍 Looks good to me, but I am missing an updated documentation/Configuration.md

@sharwell sharwell force-pushed the indentation-settings branch from ddfa852 to fd7e631 Compare January 12, 2016 22:56
@sharwell
Copy link
Member Author

@vweijsters I updated this to address your feedback.

@sharwell sharwell added this to the 1.1.0 Beta 1 milestone Jan 13, 2016
@vweijsters
Copy link
Contributor

👍 With one minor remark on documentation/Configuration.md

@sharwell
Copy link
Member Author

@vweijsters Fixed again. The behavior when tabSize is not a multiple of indentationSize is ... 😦

@sharwell sharwell force-pushed the indentation-settings branch from 20047ec to 156835d Compare January 13, 2016 10:48
sharwell added a commit that referenced this pull request Jan 13, 2016
Move indentation options from workspace settings to stylecop.json
@sharwell sharwell merged commit 6f52625 into DotNetAnalyzers:master Jan 13, 2016
@sharwell sharwell deleted the indentation-settings branch January 13, 2016 10:56
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.

3 participants