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 SA1003 and SA1008 to not require space before a cast inside a range expression #3409

Merged

Conversation

bjornhellander
Copy link
Contributor

Fixes #3386.

Note that this false positive was specifically due to the cast. There does not seem to ever be any diagnostic issued for the range in itself, so both 1..2 and 1 .. 2 are ok.

@codecov
Copy link

codecov bot commented Nov 28, 2021

Codecov Report

Merging #3409 (7754e6b) into master (0b40032) will decrease coverage by 0.05%.
The diff coverage is 100.00%.

❗ Current head 7754e6b differs from pull request most recent head d2a3d2b. Consider uploading reports for the commit d2a3d2b to get more accurate results

@@            Coverage Diff             @@
##           master    #3409      +/-   ##
==========================================
- Coverage   93.15%   93.09%   -0.06%     
==========================================
  Files        1043     1039       -4     
  Lines      111978   111852     -126     
  Branches     3973     3969       -4     
==========================================
- Hits       104312   104132     -180     
- Misses       6645     6702      +57     
+ Partials     1021     1018       -3     

@sharwell sharwell merged commit b5b91d7 into DotNetAnalyzers:master Dec 9, 2021
@sharwell sharwell added this to the 1.2-beta.next milestone Dec 9, 2021
@bjornhellander bjornhellander deleted the feature/Issue3386CastInRange branch May 2, 2022 17:49
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.

Explicit cast as range end operand causes incorrect SA1003 and SA1008
2 participants