Installation
pip
Usage
Check a single file:
Check an entire directory recursively:
Use a custom config location:
Exit codes
| Code | Meaning |
|---|---|
0 |
No errors (warnings are allowed) |
1 |
One or more error-level violations found |
CI/CD integration
GitHub Actions
The job fails automatically if any error-level rule fires. Warnings are reported but do not block the pipeline.
Pre-commit hook
# .pre-commit-config.yaml
repos:
- repo: local
hooks:
- id: pyspark-antipattern
name: PySpark antipattern linter
entry: pyspark-antipattern check
language: system
types: [python]
pass_filenames: false
args: ["src/"]
Suppressing a specific line
Add a # noqa: pap: RULE_ID comment to suppress one or more rules on that line: