DotNetAnalyzers / StyleCopAnalyzers

An implementation of StyleCop rules using the .NET Compiler Platform
MIT License
2.61k stars 506 forks source link

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

Closed bjornhellander closed 1 month ago

bjornhellander commented 1 month ago

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.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

Additional details and impacted files ```diff @@ 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 ```