je_load_density.utils.linter.action_linter

Action JSON linter.

Statically checks a LoadDensity action JSON for unknown commands, hard-coded URLs, weak parameter usage, missing tasks, and a few other foot-guns. Returns a list of LintFinding records — does not raise unless the input is structurally invalid.

Functions

lint_action(actions[, known_commands])

Lint an action JSON.

lint_action_file(path[, known_commands])

Read an action JSON file from disk and lint it.

Classes

LintFinding(rule, severity, message[, location])

One rule hit.

class je_load_density.utils.linter.action_linter.LintFinding(rule: str, severity: str, message: str, location: str = '')

Bases: object

One rule hit. severity is error or warning.

as_dict() Dict[str, str]
location: str = ''
message: str
rule: str
severity: str
je_load_density.utils.linter.action_linter.lint_action(actions: List[Any] | Dict[str, Any], known_commands: Set[str] | None = None) List[Dict[str, str]]

Lint an action JSON. Returns a list of finding dicts.

je_load_density.utils.linter.action_linter.lint_action_file(path: str, known_commands: Set[str] | None = None) List[Dict[str, str]]

Read an action JSON file from disk and lint it.