Skip to content
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

Clean up #13202

Merged
merged 3 commits into from Feb 10, 2023
Merged

Clean up #13202

merged 3 commits into from Feb 10, 2023

Conversation

hishamco
Copy link
Member

@hishamco hishamco commented Feb 4, 2023

No description provided.

Name = "Search",
Area = searchProviders.FirstOrDefault().AreaName,
Action = "Search",
Controller = "Search" }
Controller = "Search"
Copy link
Member

Choose a reason for hiding this comment

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

, at the end

Copy link
Member Author

Choose a reason for hiding this comment

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

Not necessary :)

Copy link
Member

Choose a reason for hiding this comment

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

But why they made it available then ;)

Copy link
Member Author

Choose a reason for hiding this comment

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

Seems hint for those who writing fast :)

Copy link
Contributor

@0liver 0liver Feb 13, 2023

Choose a reason for hiding this comment

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

StyleCop has this rule to enforce a trailing comma in multi-line object initializers.

The advantage of having it is that changes to the code will be restricted to adding and removing lines, in contrast to adding a new line at the end of the object initializer AND adding a the comma to the line before. This makes diffs a lot more readable.

I think we should have analyzers in place for such things to avoid overhead in reviews.

UPDATE: See this SO answer for more background info on the topic.

@hishamco hishamco merged commit 9c596b5 into main Feb 10, 2023
@hishamco hishamco deleted the hishamco/cleanup branch February 10, 2023 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants