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

Added more code style rules #19871

Merged
merged 7 commits into from Jan 20, 2022
Merged

Added more code style rules #19871

merged 7 commits into from Jan 20, 2022

Conversation

penev92
Copy link
Member

@penev92 penev92 commented Jan 9, 2022

This is a continuation of my recent efforts to finally have our toolchain enforce our long-standing code style rules.
Follow-up of #19747 and #19801, this adds two three more rules to .editorconfig to treat two three more suggestions as warnings, which the CI then treats as errors.
Calling @RoosterDragon.

.editorconfig Outdated Show resolved Hide resolved
@penev92
Copy link
Member Author

penev92 commented Jan 9, 2022

To resolve the issue of the style inside .editorconfig I'm making this depends on #19873.

RoosterDragon
RoosterDragon previously approved these changes Jan 10, 2022
Copy link
Member

@RoosterDragon RoosterDragon left a comment

Choose a reason for hiding this comment

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

LGTM. One fixup request.

.editorconfig Outdated Show resolved Hide resolved
@penev92
Copy link
Member Author

penev92 commented Jan 12, 2022

Added two more commits - one to change dotnet_diagnostic.IDE0011.severity from none to silent as requested and one to add more comments to .editorconfig to give context for some of the rules there.

RoosterDragon
RoosterDragon previously approved these changes Jan 13, 2022
@Mailaender Mailaender removed this from the Next release milestone Jan 18, 2022
Changed all currently present zero-length array allocations in the codebase to use `Array.Empty` instead.
Having this set to "none" disabled the IDE's option to add braces, whereas "silent" lets it do it on the user's request while still not suggesting it on its own.
@penev92
Copy link
Member Author

penev92 commented Jan 19, 2022

Rebased. Only changes are to the comments in .editorconfig.

RoosterDragon
RoosterDragon previously approved these changes Jan 19, 2022
To order them by their number.
Copy link
Member

@abcdefg30 abcdefg30 left a comment

Choose a reason for hiding this comment

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

Ok.

@abcdefg30 abcdefg30 merged commit a67cfab into OpenRA:bleed Jan 20, 2022
@penev92 penev92 deleted the codeStyleRules branch January 31, 2022 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants