blacken-docs icon indicating copy to clipboard operation
blacken-docs copied to clipboard

Add support for a `--check` argument

Open JoaquimEsteves opened this issue 2 years ago • 1 comments

Description

Hello, we've recently started using your tool in our team.

My issue with it is that I abhor when formatters fix my text without warning me first; this is particularly annoying with pre-commit hooks.

I'd like to request for a --check command that would exit with an error whenever blacken-docs would suggest a change - the original black tool offers this posibility.

If PRs are welcome I can probably cook something up.

EDIT: Created a small PR for this issue.

JoaquimEsteves avatar Aug 23 '23 14:08 JoaquimEsteves

Just ran into this myself and came here to open an issue.

simonw avatar Sep 07 '23 23:09 simonw