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

Change Main Linter to Ruff #1301

Merged
merged 5 commits into from
Feb 11, 2025
Merged

Change Main Linter to Ruff #1301

merged 5 commits into from
Feb 11, 2025

Conversation

TimPansino
Copy link
Contributor

@TimPansino TimPansino commented Feb 5, 2025

Overview

With ruff being added to megalinter there is little reason to stick with a host collection of older linters when ruff is quite literally 1000x faster. This should replace our existing linter setup completely with just ruff format and ruff check (--fix optionally).

  • Swap main linter to ruff in CI.
  • Add configuration for ruff that mimics existing linter configs.
  • Massively expand list of linters and plugins used.
    • (Should be collaboratively pruned with use of any that aren't helpful.)

Merging Strategy

  1. Merge this PR to add configuration for ruff and enable it as the default linter/formatter.
  2. Run ruff format to format the entire repo and clean up all our inconsistent code. Commit as the bot user and PR.
  3. Run ruff check --fix to attempt to fix issues the linter believes it can fix, and review each and every change by hand. Commit as the bot user and PR.

This should make it easier to review by separating the topics of the PRs. That way we can look much more critically at 3.

@TimPansino TimPansino requested a review from a team as a code owner February 5, 2025 18:55
Copy link

github-actions bot commented Feb 5, 2025

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ YAML prettier 2 0 0 0.45s
✅ YAML v8r 2 0 3.73s
✅ YAML yamllint 2 0 0.27s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@mergify mergify bot added the tests-failing label Feb 5, 2025
@codecov-commenter
Copy link

codecov-commenter commented Feb 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.30%. Comparing base (9abd5a1) to head (61739f0).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1301      +/-   ##
==========================================
+ Coverage   81.21%   81.30%   +0.08%     
==========================================
  Files         203      203              
  Lines       22492    22492              
  Branches     3567     3567              
==========================================
+ Hits        18266    18286      +20     
+ Misses       3038     3019      -19     
+ Partials     1188     1187       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mergify mergify bot removed the tests-failing label Feb 5, 2025
@TimPansino TimPansino merged commit ee128f8 into main Feb 11, 2025
57 checks passed
@TimPansino TimPansino deleted the feature-ruff branch February 11, 2025 16:51
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.

3 participants