Lint your code using regex patterns, e.g. to check for copyright headers.
To activate this with the `lint
` goal, you must set `[regex-lint].config
`.
Unlike other linters, this can run on files not owned by targets, such as BUILD files.
Backend: <span style="color: purple"><code>pants.backend.project_info</code></span> Config section: <span style="color: purple"><code>[regex-lint]</code></span>
## Basic options
<div style="color: purple">
### `config
`
<code>--regex-lint-config="{'key1': val1, 'key2': val2, ...}"</code><br> <code>PANTS_REGEX_LINT_CONFIG</code><br>
</div> <div style="padding-left: 2em;"> <span style="color: green">default: <code>{}</code></span>
<br>
Config schema is as follows:
Meaning: if a file matches some path pattern, its content must match all the corresponding content patterns.
It's often helpful to load this config from a JSON or YAML file. To do that, set `[regex-lint].config = '@path/to/config.yaml'
`, for example.
</div> <br>
<div style="color: purple">
### `detail_level
`
<code>--regex-lint-detail-level=<DetailLevel></code><br> <code>PANTS_REGEX_LINT_DETAIL_LEVEL</code><br>
</div> <div style="padding-left: 2em;"> <span style="color: green">one of: <code>none, summary, nonmatching, names, all</code></span><br> <span style="color: green">default: <code>nonmatching</code></span>
<br>
How much detail to include in the result.
</div> <br>
## Advanced options
None
## Deprecated options
None