Lint¶
This page describes the
invoke_tasklib.lint module.
Overview¶
| Task | Behavior |
|---|---|
lint.check-python |
Checks code linting with ruff (read-only) |
lint.fix-python |
Fixes auto-fixable linting issues in place with ruff |
Usage¶
invoke lint.check-python
This runs ruff check --output-format=github ., which is well-suited for use in a GitHub Actions
workflow since ruff annotates violations directly on the diff.
invoke lint.fix-python
This runs ruff check --fix ., which rewrites files in place for every auto-fixable violation.
Not every lint rule is auto-fixable, so lint.check-python may still report violations afterwards
that need a manual fix.
Warning
lint.fix-python modifies files in place. Commit your work before running it.
See Also¶
- Format:
format.check-python/format.fix-pythonfor formatting (as opposed to linting) with ruff. invoke_tasklib.lintreference- Troubleshooting: fixes for "command not found" errors.