Static Code Analysis
Lint Python source with Ruff
ruff-check is a Python source linting node powered by Ruff.
overview
What ruff-check does
Connect a Python source folder and inspect Ruff diagnostics as JSON. The Ruff 0.16.9 node respects repository configuration while keeping source files unchanged. Each finding can include a rule code, message and source location.
The source folder can contain pyproject.toml or ruff.toml. The wrapper runs Ruff check with --no-fix, --no-fix-only and --no-cache. A repository configuration that enables fixes does not make this node apply them.
Findings produce successful task output, and clean input produces an empty JSON array. A configuration or runtime error fails the task. A successful node status therefore means diagnostics were collected, not that the source has no findings.
The saved synthetic Trickest result contains an F401 unused-import finding. Local checks also verify clean input, malformed configuration and unchanged source when repository configuration requests fixes.
This node lints source without running the Python application or its tests. Use a separate test runner for runtime behavior, and choose lint rules in repository configuration for the checks your project requires.
source github.com/astral-sh/ruff
use cases
Where ruff-check fits
Inspect Python lint findings
Collect rule codes and source locations from a source folder.
Review without applying fixes
Inspect suggested changes while retaining the original files.
Feed a later policy step
Parse the JSON diagnostics and choose your own blocking rules.
reference
ruff-check inputs and flags
| Name | Type | Flag | Description |
|---|---|---|---|
| source | FOLDER | --source | Python source folder, optionally containing pyproject.toml or ruff.toml. The wrapper disables fixes and cache writes. |
Showing key inputs. ruff-check exposes 1 inputs in total.
example
Run ruff-check
ruff check --no-fix --no-fix-only --no-cache --output-format json -- ./source[
{
"code": "F401",
"end_location": {
"column": 10,
"row": 1
},
"location": {
"column": 8,
"row": 1
},
"message": "`os` imported but unused",
"name": "unused-import",
"severity": "error"
}
]guidance
Choosing ruff-check
Use this node for Python lint diagnostics with existing Ruff configuration. Use a separate formatter or test runner when the task requires formatting changes or runtime assertions.
actionlint
Checks GitHub Actions workflow definitions rather than Python source.
pytest
Executes Python tests. Ruff checks source statically.
faq
ruff-check questions
related
More Static Code Analysis tools
bandit
Python source in, JSON security findings out.
gitleaks
Detect hardcoded secrets in git repos and plain directories.
gosec
Go AST security scanner for credentials, crypto, and injection.
guarddog
A package coordinate in, indicator hits out.
malcontent-scan
A package coordinate in, behavior findings out.
osv-malicious
A package coordinate in, malware advisory rows out.
Run ruff-check yourself
Selected fields from native JSON downloaded from a completed private synthetic Trickest run. File paths, fix suggestions and the rule documentation URL are omitted.
Facts on this page come from the live Trickest tool library.