rtts / djhtml

Django/Jinja template indenter
GNU General Public License v3.0
582 stars 32 forks source link

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

Closed DeD1rk closed 1 year ago

DeD1rk commented 1 year ago

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.

JaapJoris commented 1 year ago

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 :innocent:

DeD1rk commented 1 year ago

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