This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 664
feat(rome_service, rome_cli): linter via configuration #2866
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Deploying with Cloudflare Pages
|
ematipico
force-pushed
the
feature/configuration-for-linter
branch
from
July 12, 2022 10:59
1df00e4
to
41e7a3c
Compare
leops
reviewed
Jul 12, 2022
ematipico
changed the title
feat(rome_cli): read configuration file
feat(rome_cli): linter configuration
Jul 12, 2022
ematipico
changed the title
feat(rome_cli): linter configuration
feat(rome_service, rome_cli): linter via configuration
Jul 12, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Closes #2862
This PR introduces a new tool section inside the configuration structure. For now only the field is
enabled
. The rest of the fields will be added later, once we have support for groups for lint rules.I updated the
TraversalMode
, which now has information about the enabled/disabled tools (formatter and linter for now). These information are passed from the configuration file.I also refactored a bit the
TraversalMode
, by joining theCheck
andFix
in a single one. They contain the same information and their difference is really minimal. A new field calledshould_fix
is set to true if--apply
argument is passed via CLI.The configuration is now merged inside the
Workspace
trait, which now also have the fieldsenabled
.Test Plan
Added new tests that checks that the linter won't analyze the files if in the configuration we set
"enabled": false