feat(policy): add default and user regal config to lint#2277
Conversation
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
… replicated code Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
|
How does regal work today in terms of config, does it auto-detect it? Maybe we can do the same? i.e if it finds a regal config file uses it? Just thinking |
If no file provided via command line, it tries to find a default configuration in .regal and in parent directories. But everything happens in the CLI/cobra setup. I think having the command line option is enough for us, but at some point we could provide the same experience. Not important at all. |
|
Also agree the |
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
Renamed the flag to
I could add this as another config lookup step for example if no config file was provided implicitly via |
| @@ -0,0 +1,14 @@ | |||
| # Default config | |||
| rules: | |||
There was a problem hiding this comment.
I'd keep the credits for the original author, i.e spacelift I think?
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
This PR adds a default configuration for the Regal linter and introduces a flag to specify custom configuration.
Usage
If no config was passed or config is malformed then default config is used as fallback.
Default config:
Part of #1108