From 575220f460fc3a5eeb05673e9cc7d8e80b6b7147 Mon Sep 17 00:00:00 2001 From: jlplenio Date: Sat, 15 Oct 2022 20:44:02 +0200 Subject: [PATCH] Clarify check argument is needed for github action workflow (#3325) Co-authored-by: Richard Si <63936253+ichard26@users.noreply.github.com> --- docs/integrations/github_actions.md | 4 +++- docs/usage_and_configuration/the_basics.md | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/integrations/github_actions.md b/docs/integrations/github_actions.md index 12bcb21fee6..ebfcc2d95a2 100644 --- a/docs/integrations/github_actions.md +++ b/docs/integrations/github_actions.md @@ -44,7 +44,9 @@ extra. Installing the extra and including Jupyter Notebook files can be configur `jupyter` (default is `false`). You can also configure the arguments passed to _Black_ via `options` (defaults to -`'--check --diff'`) and `src` (default is `'.'`) +`'--check --diff'`) and `src` (default is `'.'`). Please note that the +[`--check` flag](labels/exit-code) is required so that the workflow fails if _Black_ +finds files that need to be formatted. Here's an example configuration: diff --git a/docs/usage_and_configuration/the_basics.md b/docs/usage_and_configuration/the_basics.md index 20aa956dd85..80897532a68 100644 --- a/docs/usage_and_configuration/the_basics.md +++ b/docs/usage_and_configuration/the_basics.md @@ -76,6 +76,8 @@ _Black_ to just tell you what it _would_ do without actually rewriting the Pytho There's two variations to this mode that are independently enabled by their respective flags. Both variations can be enabled at once. +(labels/exit-code)= + #### Exit code Passing `--check` will make _Black_ exit with: