Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update SA1015 to not care about trailing spaces in a number of cases: typically last in dictionary initializer items, collection initializers and collection expressions. #3856 #3857

Conversation

bjornhellander
Copy link
Contributor

Fixes #3856 by ignoring trailing space in the reported case and letting it be handled by SA1013.
Also found some other cases that I think should also be handled in the same way.

… typically last in dictionary initializer items, collection initializers and collection expressions. DotNetAnalyzers#3856
Copy link

codecov bot commented Jun 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.45%. Comparing base (b9a30bc) to head (320f616).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3857   +/-   ##
=======================================
  Coverage   97.45%   97.45%           
=======================================
  Files         926      926           
  Lines      110136   110188   +52     
  Branches     3311     3312    +1     
=======================================
+ Hits       107332   107384   +52     
  Misses       1837     1837           
  Partials      967      967           

@sharwell sharwell merged commit de67e30 into DotNetAnalyzers:master Jun 3, 2024
19 checks passed
@sharwell sharwell added this to the 1.2-beta.next milestone Jun 3, 2024
@bjornhellander bjornhellander deleted the feature/sa1015-initializer-3856 branch June 3, 2024 18:10
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SA1015 false positive on object initializer
2 participants