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

Update spacing rules for C# 7 #2389

Merged
merged 15 commits into from
Jun 11, 2017
Merged

Conversation

sharwell
Copy link
Member

@sharwell sharwell commented Jun 10, 2017

Fixes #2267
Fixes #2308

  • Run all existing spacing tests with Roslyn 1.3 and Roslyn 2.0
  • SA1000
    • out keyword for out variables
    • ref keyword for ref locals and expressions
    • var keyword
  • SA1001
  • SA1002
  • SA1003
    • Arrow expression clause =>
  • SA1004
  • SA1005
  • SA1006
  • SA1007
  • SA1008
    • Tuple types
    • Tuple expressions
    • ref expressions
  • SA1009
    • Tuple types
    • Tuple expressions
  • SA1010
  • SA1011
    • ] before a comma in a tuple type (int[], int)
  • SA1012
  • SA1013
    • } before a comma in tuple expression (new[] { 3 }, 3)
  • SA1014
  • SA1015
    • > before a comma or closing parenthesis in tuple type (Func<int>, Func<int>)
  • SA1016
  • SA1017
  • SA1018
    • Nullable tuple type, e.g. (int, int)?
  • SA1019
  • SA1020
  • SA1021
  • SA1022
  • SA1023
  • SA1024
    • Tuple expressions, e.g. (x: 3, y: 4)
  • SA1025
  • SA1026
  • SA1027
  • SA1028

@codecov
Copy link

codecov bot commented Jun 10, 2017

Codecov Report

Merging #2389 into master will increase coverage by 0.14%.
The diff coverage is 99.59%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2389      +/-   ##
==========================================
+ Coverage    95.3%   95.44%   +0.14%     
==========================================
  Files         664      675      +11     
  Lines       87833    89486    +1653     
  Branches     3428     3431       +3     
==========================================
+ Hits        83709    85411    +1702     
+ Misses       3206     3154      -52     
- Partials      918      921       +3
Impacted Files Coverage Δ
...s/SA1009ClosingParenthesisMustBeSpacedCorrectly.cs 100% <ø> (ø) ⬆️
...Cop.Analyzers.Test/SpacingRules/SA1003UnitTests.cs 100% <ø> (ø) ⬆️
...SpacingRules/SA1003SymbolsMustBeSpacedCorrectly.cs 100% <100%> (ø) ⬆️
...est.CSharp7/SpacingRules/SA1011CSharp7UnitTests.cs 100% <100%> (ø)
...est.CSharp7/SpacingRules/SA1018CSharp7UnitTests.cs 100% <100%> (ø)
...est.CSharp7/SpacingRules/SA1013CSharp7UnitTests.cs 100% <100%> (ø)
...est.CSharp7/SpacingRules/SA1008CSharp7UnitTests.cs 100% <100%> (ø)
...est.CSharp7/SpacingRules/SA1024CSharp7UnitTests.cs 100% <100%> (ø)
...est.CSharp7/SpacingRules/SA1009CSharp7UnitTests.cs 100% <100%> (ø)
...est.CSharp7/SpacingRules/SA1000CSharp7UnitTests.cs 100% <100%> (ø)
... and 23 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 26858c3...187bcc8. Read the comment docs.

case SyntaxKind.SelectKeyword:
case SyntaxKind.StackAllocKeyword:
case SyntaxKind.SwitchKeyword:
case SyntaxKind.UsingKeyword:
case SyntaxKind.TypeVarKeyword:
Copy link
Member Author

Choose a reason for hiding this comment

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

❗️ this is the typevar keyword used as an attribute location, not the var keyword I intended.

@sharwell sharwell changed the title [WIP] Update spacing rules for C# 7 Update spacing rules for C# 7 Jun 11, 2017
@sharwell sharwell self-assigned this Jun 11, 2017
@sharwell sharwell added this to the 1.1.0 Beta 2 milestone Jun 11, 2017
@sharwell sharwell merged commit 3f098f5 into DotNetAnalyzers:master Jun 11, 2017
@sharwell sharwell deleted the csharp7-spacing branch June 11, 2017 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant