Checks
Controls pre and post checks for code modifications.
Field | Description |
---|---|
custom |
Custom check configurations. Entries with the same name as a builtin will override the builtin |
builtin |
Built-in check configurations |
disable |
List of checks to disable |
enable |
List of checks to enable |
no_pre |
Skip all pre-checks |
only |
Optional single check name to run |
Check configurations have the following fields:
Field | Description |
---|---|
name |
Name of the check for display and error reporting |
command |
Shell command to execute, run with sh -c |
globs |
List of glob patterns to match against files for determining relevance |
default_off |
Whether this check defaults to off in the configuration |
fail_on_stderr |
Whether to treat any stderr output as a failure, regardless of exit code |
mode |
When this check should run - one of pre , post , or both |
Example
Example of configuring a custom check.
(
checks: (
custom: [
(
name: "mypy",
command: "mypy --strict",
globs: ["*.py"],
default_off: false,
fail_on_stderr: true,
mode: both,
),
],
enable: ["cargo-clippy"],
),
)