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

Include settings path in --show-settings #3202

Closed
charliermarsh opened this issue Feb 24, 2023 · 2 comments · Fixed by #4199
Closed

Include settings path in --show-settings #3202

charliermarsh opened this issue Feb 24, 2023 · 2 comments · Fixed by #4199
Labels
cli Related to the command-line interface

Comments

@charliermarsh
Copy link
Member

We should tell you which settings file was loaded on-disk.

@charliermarsh charliermarsh added the cli Related to the command-line interface label Feb 24, 2023
@charliermarsh
Copy link
Member Author

This is surprisingly difficult (or, at least, requires some refactoring).

@dhruvmanila
Copy link
Member

I think I can take this up tomorrow, have been looking at the CLI code recently.

One doubt is what to output when ran in --isolated mode or using the default settings as a fallback. Maybe don't include the path or leave it blank like "-":

https://github.com/charliermarsh/ruff/blob/333f1bd9ceff6390ae652790abb22cd175042bc7/crates/ruff_cli/src/resolve.rs#L65-L72

The output I'm thinking of:

$ ruff check --show-settings .
Resolved settings for: "..."
Settings path: "..."
Settings {
    rules: RuleTable {
        enabled: {
			...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to the command-line interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants