Updated Oct 15, 2026

Static Code Analysis

Lint Python source with Ruff

ruff-check is a Python source linting node powered by Ruff.

Agent

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

1 inputs
NameTypeFlagDescription
sourceFOLDER--sourcePython 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 · command
ruff check --no-fix --no-fix-only --no-cache --output-format json -- ./source
sample output
[
  {
    "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

No. The wrapper passes --no-fix and --no-fix-only even when repository configuration requests fixes.

Include the repository pyproject.toml or ruff.toml in the source folder.

No. The output is a JSON diagnostics array. Configuration or runtime failures fail the task.

No. This node runs Ruff check over source files.

The wrapper disables the Ruff cache with --no-cache.

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.