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

Add per-file output to --check and add -q flag #88

Merged

Conversation

DeD1rk
Copy link
Contributor

@DeD1rk DeD1rk commented Mar 1, 2023

This will show which files would have been formatted when running with --check. The old behaviour can be restored by using --check --quiet.

I need this for CI, where it's usually desirable to have both the non-zero exit code and actionable and informative feedback.

The --quiet flag makes it possible to restore the original quiet behaviour with --check --quiet, and may also be nice for people who want a quiet option without --check.

This will show which files would have been formatted when running with --check.
The old behaviour can be restored by using --check --quiet.
djhtml/__main__.py Outdated Show resolved Hide resolved
The `--quiet` option has been removed before in favor of printing all
output to stderr. That way, the user can redirect stderr to
`/dev/null` in order to ignore it.
@JaapJoris
Copy link
Member

Thank you very much for this PR. I understand the need to know which files would have been reindented, and it is also more consistent with the output without the -c argument. Thank you for this useful improvement.

However, I've taken the liberty to re-remove the --quiet option. It was removed before in favor of printing all output to stderr, and I like it that way 😇

@JaapJoris JaapJoris merged commit fc79d16 into rtts:main Mar 4, 2023
@DeD1rk
Copy link
Contributor Author

DeD1rk commented Mar 4, 2023

Ah right, I didn't know that, and don't have any need for -q either. Thanks!

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

Successfully merging this pull request may close these issues.

2 participants