-
Notifications
You must be signed in to change notification settings - Fork 1.4k
SA1504 All accessors should be single-line or multi-line #7270
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -966,8 +966,14 @@ TaskRegistry IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, Projec | |
| { | ||
| [DebuggerStepThrough] | ||
| get | ||
| { return TaskRegistry; } | ||
| set { TaskRegistry = value; } | ||
| { | ||
| return TaskRegistry; | ||
| } | ||
|
|
||
| set | ||
| { | ||
| TaskRegistry = value; | ||
| } | ||
| } | ||
|
|
||
| /// <summary> | ||
|
|
@@ -1074,8 +1080,14 @@ List<string> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, Projec | |
| { | ||
| [DebuggerStepThrough] | ||
| get | ||
| { return InitialTargets; } | ||
| set { InitialTargets = value; } | ||
| { | ||
| return InitialTargets; | ||
| } | ||
|
|
||
| set | ||
| { | ||
| InitialTargets = value; | ||
| } | ||
|
Comment on lines
1082
to
+1090
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried, but I still get an error because of the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Raised an issue at DotNetAnalyzers/StyleCopAnalyzers#3434 |
||
| } | ||
|
|
||
| /// <summary> | ||
|
|
@@ -1086,8 +1098,14 @@ List<string> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, Projec | |
| { | ||
| [DebuggerStepThrough] | ||
| get | ||
| { return DefaultTargets; } | ||
| set { DefaultTargets = value; } | ||
| { | ||
| return DefaultTargets; | ||
| } | ||
|
|
||
| set | ||
| { | ||
| DefaultTargets = value; | ||
| } | ||
| } | ||
|
|
||
| /// <summary> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it unintentionally missing comment also?