SA1504 All accessors should be single-line or multi-line#7270
Merged
ladipro merged 4 commits intodotnet:mainfrom Jan 21, 2022
Merged
SA1504 All accessors should be single-line or multi-line#7270ladipro merged 4 commits intodotnet:mainfrom
ladipro merged 4 commits intodotnet:mainfrom
Conversation
Contributor
Author
|
I think this is a temporary test failure. |
ladipro
reviewed
Jan 13, 2022
Comment on lines
1082
to
+1090
| get | ||
| { return InitialTargets; } | ||
| set { InitialTargets = value; } | ||
| { | ||
| return InitialTargets; | ||
| } | ||
|
|
||
| set | ||
| { | ||
| InitialTargets = value; | ||
| } |
Member
There was a problem hiding this comment.
This property looks like a candidate for the single-line version. Would this not fix the warning?
get { return InitialTargets; }
set { InitialTargets = value; }Same for a couple of similar props in this PR.
Contributor
Author
There was a problem hiding this comment.
I tried, but I still get an error because of the [DebuggerStepThrough] attribute. We need to probably raise another issue for the analyzer.
Contributor
Author
There was a problem hiding this comment.
Raised an issue at DotNetAnalyzers/StyleCopAnalyzers#3434
AR-May
reviewed
Jan 13, 2022
|
|
||
| set | ||
| { | ||
| // Update the dictionary if it exists. |
Member
There was a problem hiding this comment.
Is it unintentionally missing comment also?
AR-May
approved these changes
Jan 13, 2022
rainersigwald
approved these changes
Jan 18, 2022
ladipro
approved these changes
Jan 19, 2022
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.
Relates to #7174
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1504.md