-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR #229: Allow lint configuration to be placed in files
I am opening this early to ask for comments. Some general info: * The configuration from file is read after setting up the default configs, but before parsing the invocation arguments. This way the arguments can easily overwrite the configuration from the file * I think the following should be considered (all of them should be optional): * a global configuration file (e.g. `~/.verible_lint.rules`) * a local configuration file (e.g. the top directory of a project), this assumes the linter is executed from the top dir of the project * any arbitrary file, specified with an argument * If we decide to use all of the options listed above we could: * combine the global file, local file and file from a flag (in that order), or * ignore global file if a local one exists, ignore both if another one is specified with a flag * always overwrite the config from files when the same flags are specified with the `-rules` switch * for now the implementation does some string operations on the file to make the format compatible with the arguments format. The only difference is the settings can be put in separate lines to improve readability. Thanks to this we can reuse the same parsing code Other options to consider: * use a completely different format for the configuration (e.g. ini files, with a general `[rules]` section, and more rule-specific configuration) Please share your thoughts. CC @hzeller GitHub PR #229 Copybara import of the project: - 776ca4e Allow lint configuration to be placed in files by Tomasz Gorochowik <[email protected]> Closes #229 PiperOrigin-RevId: 301922115
- Loading branch information
1 parent
af5273e
commit 751d4d8
Showing
5 changed files
with
150 additions
and
66 deletions.
There are no files selected for viewing
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
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
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
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
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