Skip to content

SA1504 All accessors should be single-line or multi-line#7270

Merged
ladipro merged 4 commits intodotnet:mainfrom
elachlan:SA1504
Jan 21, 2022
Merged

SA1504 All accessors should be single-line or multi-line#7270
ladipro merged 4 commits intodotnet:mainfrom
elachlan:SA1504

Conversation

@elachlan
Copy link
Contributor

@elachlan elachlan commented Jan 12, 2022

@elachlan
Copy link
Contributor Author

I think this is a temporary test failure.

Comment on lines 1082 to +1090
get
{ return InitialTargets; }
set { InitialTargets = value; }
{
return InitialTargets;
}

set
{
InitialTargets = value;
}
Copy link
Member

Choose a reason for hiding this comment

The 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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried, but I still get an error because of the [DebuggerStepThrough] attribute. We need to probably raise another issue for the analyzer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


set
{
// Update the dictionary if it exists.
Copy link
Member

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?

@ladipro ladipro added the merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now. label Jan 19, 2022
@ladipro ladipro merged commit 90275e4 into dotnet:main Jan 21, 2022
@elachlan elachlan deleted the SA1504 branch January 21, 2022 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants