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

Fix handling of trivia before first using directive #2435

Merged
merged 6 commits into from
Jun 20, 2017

Conversation

sharwell
Copy link
Member

@sharwell sharwell commented Jun 19, 2017

Fixes #2363

Also fixes a few other subtle bugs revealed during testing.

@sharwell sharwell added this to the 1.1.0 Beta 4 milestone Jun 19, 2017
@sharwell sharwell force-pushed the fix-using-trivia branch 2 times, most recently from 1c74e8f to 42bbb42 Compare June 19, 2017 11:04
@codecov
Copy link

codecov bot commented Jun 19, 2017

Codecov Report

Merging #2435 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2435      +/-   ##
==========================================
+ Coverage   97.14%   97.17%   +0.03%     
==========================================
  Files         732      732              
  Lines       94107    94425     +318     
  Branches     3449     3468      +19     
==========================================
+ Hits        91417    91756     +339     
+ Misses       1834     1811      -23     
- Partials      856      858       +2
Impacted Files Coverage Δ
...es/UsingCodeFixProviderGroupSeparationUnitTests.cs 100% <100%> (ø) ⬆️
...op.Analyzers.Test/OrderingRules/SA1200UnitTests.cs 100% <100%> (ø) ⬆️
...OrderingRules/UsingCodeFixProvider.UsingsSorter.cs 88.12% <100%> (+5.73%) ⬆️
...rs.CodeFixes/OrderingRules/UsingCodeFixProvider.cs 94.03% <100%> (+0.66%) ⬆️
...t/OrderingRules/SA1200OutsideNamespaceUnitTests.cs 100% <100%> (ø) ⬆️
...nalyzers/StyleCop.Analyzers/LightJson/JsonValue.cs 100% <0%> (ø) ⬆️
...tyleCop.Analyzers.Test/LightJson/JsonValueTests.cs 100% <0%> (ø) ⬆️
...es/OrderingRules/UsingCodeFixProvider.SourceMap.cs 76.97% <0%> (+2.63%) ⬆️
... and 1 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 04deed8...bde958b. Read the comment docs.

When a comment preceding a set of using directives is separated from the first
using directive by a blank line, that comment is associated with the list of
using directives as opposed to specifically tied to the first one. This means
after reordering the separated comment will continue to be separated and placed
before the first using directive of the sorted result.
@sharwell sharwell self-assigned this Jun 20, 2017
@sharwell sharwell merged commit f2d2cc3 into DotNetAnalyzers:master Jun 20, 2017
@sharwell sharwell deleted the fix-using-trivia branch June 20, 2017 18:19
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

Successfully merging this pull request may close these issues.

Bug in code fix for SA1200 Using directive must appear in namespace declaration
1 participant