Update for null-forgiving operator at end of line#4080
Draft
EdwinEngelen wants to merge 7 commits intoDotNetAnalyzers:masterfrom
Draft
Update for null-forgiving operator at end of line#4080EdwinEngelen wants to merge 7 commits intoDotNetAnalyzers:masterfrom
EdwinEngelen wants to merge 7 commits intoDotNetAnalyzers:masterfrom
Conversation
This resolves NU1605 package downgrade errors.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #4080 +/- ##
========================================
Coverage 94.60% 94.61%
========================================
Files 1026 1029 +3
Lines 119110 119245 +135
Branches 3475 3480 +5
========================================
+ Hits 112684 112820 +136
Misses 5366 5366
+ Partials 1060 1059 -1 🚀 New features to boost your workflow:
|
7f1df1f to
c31d935
Compare
…d by member access
…d by colon in conditional expression
…d by delegate invocation
c31d935 to
333386c
Compare
Member
|
Marking as draft for now due to dependency on #4077 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This falsely triggers SA1003 on the null-forgiving operator at the end of the line.
Method chaining is a common practice and placing each method call on a separate line is clean. When a null-forgiving operator is applied, then it should be placed immediately after the expression that can be null. So that's at the end of the line, and not at the beginning of the next line.
Depends on PR #4077 (a stack of pull requests that together produce a NuGet package that solves my StyleCop problems).