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

CLI and config file should be decoupled #235

Open
LiamPattinson opened this issue Dec 13, 2024 · 0 comments
Open

CLI and config file should be decoupled #235

LiamPattinson opened this issue Dec 13, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@LiamPattinson
Copy link
Collaborator

PR #232 introduces per-file-ignores, which have the following syntax on the command line:

--per-file-ignores=<pattern>:<ignore>
# e.g.
--per-file-ignores=**/some_dir/*.f90:typing,**/some_dir/*.f90:style

As the config file is read using serde and the same structs used by clap to define the CLI, the same syntax is needed in the config files:

[check]
per-file-ignores = [
  "**/some_dir/*.f90:typing",
  "**/some_dir/*.f90:style",
]

A better syntax, and one familiar to Ruff users, would be:

[check.per-file-ignores]
"**/some_dir/*.f90" = ["typing", "style"]

As more configuration options are added there will likely be more instances where the best practices for the CLI and config files will diverge, and so we should implement a separate set of structs for the config files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant