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

Align .editorconfig with WinForms #10080

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

JeremyKuhne
Copy link
Member

@JeremyKuhne JeremyKuhne commented Nov 16, 2024

This effectively copies the .editorconfig from WinForms to align the baseline.

As there are many deviations from the rules in the sources, added a temporary .editorconfig in the product src directory. This will need to have rules pulled bit by bit as the projects are fixed. Most of the rules are pretty easy to fix but would require some pretty massive code fix changes. They are reasonably safe to do, but they will create disruption for existing PRs as they'll need to rebase.

Created another .editorconfig specifically for the cycle breaker projects. Fixed the headers in the cycle breakers, but otherwise mostly left them alone.

Test projects were updated to pass without needing any overrides. As a general rule, we try to not disable rules for test projects as we want to keep good habits over the entire codebase.

The sooner the automated fixes are done, the better. It is better to have this done before Preview 1 and it is better to aggressively push to do them. Don't wait for full test passes in-between changes, do a full pass once they are committed. The recommendation:

  1. For each rule where there is an automated fix, run the fix and create a PR that says that you ran the code fix
  2. Sanity review and merge each as quickly as possible (check off, merge as soon as green)
  3. Run a full test pass when finished

Clearing the automated fixes should be able to be done in a couple weeks at most. Once the rules are turned on it will significantly improve the contribution process. Less cleanup to review, less iteration over rules, etc.

Microsoft Reviewers: Open in CodeFlow

This effectively copies the .editorconfig from WinForms to align the baseline.

As there are many deviations from the rules in the sources, added a temporary .editorconfig in the product src directory. This will need to have rules pulled bit by bit as the projects are fixed. Most of the rules are pretty easy to fix, but would require some pretty massive codefix changes. They are reasonably safe to do, but they will create disruption for existing PRs as they'll need to rebase.

Created another .editorconfig specifically for the cycle breaker projects. Fixed the headers in the cycle breakers, but otherwise mostly left them alone.

Test projects were updated to pass without needing any overrides. As a general rule, we try to not disable rules for test projects as we want to keep good habits over the entire codebase.

The sooner the automated fixes are done, the better. It is better to have this done before Preview 1 and it is better to aggressively push to do them. Don't wait for full test passes inbetween changes, do a full pass once they are committed. The recommendation:

1. For each rule where there is an automated fix, run the fix and create a PR that says that you ran the codefix
2. Sanity review and merge each as quickly as possible (check off, merge as soon as green)
3. Run a full test pass when finished

Clearing the automated fixes should be able to be done in a couple weeks at most. Once the rules are turned on it will significantly improve the contribution process. Less clean up to review, less iteration over rules, etc.
@JeremyKuhne JeremyKuhne requested review from a team as code owners November 16, 2024 21:46
@dotnet-policy-service dotnet-policy-service bot added the PR metadata: Label to tag PRs, to facilitate with triage label Nov 16, 2024
@JeremyKuhne
Copy link
Member Author

This is a step towards #10017.

@JeremyKuhne
Copy link
Member Author

#10011 is one of the larger semi-automated fixes that would apply towards enabling the disabled rules in this PR.

Copy link
Member

@harshit7962 harshit7962 left a comment

Choose a reason for hiding this comment

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

LGTM

@harshit7962 harshit7962 merged commit d73dd1d into dotnet:main Nov 18, 2024
8 checks passed
@harshit7962 harshit7962 self-assigned this Nov 18, 2024
@harshit7962
Copy link
Member

Thank you @JeremyKuhne for the help here, we will iteratively resolve the pending failures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR metadata: Label to tag PRs, to facilitate with triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants