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 false positive in SA1516 between global statements #3482

Merged

Conversation

maxkoshevoi
Copy link
Contributor

Fixes: #3351

@codecov
Copy link

codecov bot commented Apr 18, 2022

Codecov Report

Merging #3482 (df4c6a3) into master (5665492) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #3482   +/-   ##
=======================================
  Coverage   93.23%   93.23%           
=======================================
  Files        1063     1063           
  Lines      113088   113132   +44     
  Branches     3979     3980    +1     
=======================================
+ Hits       105438   105482   +44     
  Misses       6630     6630           
  Partials     1020     1020           

Comment on lines +107 to +111
// /0/Test0.cs(2,1): warning SA1516: Elements should be separated by blank line
Diagnostic().WithLocation(0),

// /0/Test0.cs(2,1): warning SA1516: Elements should be separated by blank line
Diagnostic().WithLocation(0),
Copy link
Member

Choose a reason for hiding this comment

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

❔ Do we know why this is reported twice?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's also reported twice in the first test in this file (from which I copied this one), so it's an existing behavior.
Not sure why it's reposted twice (or even is it actually reported twice, or it's a test system issue)

@sharwell sharwell enabled auto-merge April 18, 2022 23:39
@sharwell sharwell merged commit 8f56280 into DotNetAnalyzers:master Apr 18, 2022
@maxkoshevoi maxkoshevoi deleted the mk/3351-global-statement branch April 19, 2022 07:42
@sharwell sharwell added this to the 1.2-beta.next milestone Apr 19, 2022
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.

SA1516: misfire in C# 9 top-level statements
2 participants