sourcefile-validation
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. To run on those, use lint '**'
rather than lint ::
, for example. Unfortunately, --changed-since=<sha>
does not yet cause this linter to run. We are exploring how to improve both these gotchas.
Backend: pants.backend.project_info
Config section: [sourcefile-validation]