jellycell.cli.commands.lint

jellycell lint — check project against lint rules.

Module Contents

Classes

LintViolation

JSON shape for a lint violation. Part of the lint §10.1 contract.

LintReport

JSON schema for jellycell lint --json. Spec §10.1 contract.

Functions

lint

Run the lint rule suite; optionally apply auto-fixes with --fix.

API

class jellycell.cli.commands.lint.LintViolation(/, **data: Any)

Bases: pydantic.BaseModel

JSON shape for a lint violation. Part of the lint §10.1 contract.

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

rule: str

None

path: str | None

None

line: int | None

None

message: str

None

fixable: bool

None

class jellycell.cli.commands.lint.LintReport(/, **data: Any)

Bases: pydantic.BaseModel

JSON schema for jellycell lint --json. Spec §10.1 contract.

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

schema_version: int

1

project: str

None

rules_run: list[str]

None

violations: list[jellycell.cli.commands.lint.LintViolation]

None

fixed: int

0

jellycell.cli.commands.lint.lint(ctx: typer.Context, path: pathlib.Path | None = typer.Argument(None, help='Project root. Defaults to discovery from cwd.'), fix: bool = typer.Option(False, '--fix', help='Apply auto-fixes to fixable violations.')) None

Run the lint rule suite; optionally apply auto-fixes with --fix.