This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Close #4452
This PR creates a new command called
rome lint
. This command runs the rules that belong to theRuleCategorie::Lint
category, it doesn't format or anything else.In this PR, I also started a refactor I had in mind for quite a while: at the moment, the process file logic lives in one single file, and it's tough to maintain because that logic has to handle different types of traversals. The intended refactor is to run a traversal (format, lint, check, ci, etc.) in a different file, one for each traversal type. This will undoubtedly duplicate code, but it will make our lives easier in the long run.
Test Plan
I copied all the tests we had under
commands/check.rs
and swapped the command to run. I removed those test cases that don't belong to the command (import sorting, format, etc.), and made sure that the majority of the test cases are correct.