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

line-length and file-extensions ignored in config files #247

Open
LiamPattinson opened this issue Dec 19, 2024 · 0 comments · May be fixed by #251
Open

line-length and file-extensions ignored in config files #247

LiamPattinson opened this issue Dec 19, 2024 · 0 comments · May be fixed by #251
Labels
bug Something isn't working

Comments

@LiamPattinson
Copy link
Collaborator

As these options have default values specified in the CLI, lines such as the following always return the default value over those specified in the config file:

let settings = Settings {
line_length: args.line_length.unwrap_or(file_settings.line_length),
};

The following lines are at fault:

/// Set the maximum allowable line length.
#[arg(long, default_value = "100")]
pub line_length: Option<usize>,
/// File extensions to check
#[arg(long, value_delimiter = ',', default_values = FORTRAN_EXTS)]
pub file_extensions: Option<Vec<String>>,

I think the solution will be to manually state the default values in the doc-comments and fall back on the stated defaults in src/check.rs

@LiamPattinson LiamPattinson added the bug Something isn't working label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant