Linting (tish-lint)

Rule IDs, severities, and running tish-lint in CI.

tish-lint is a standalone linter (like Clippy vs rustc). The compiler CLI tish does not run lints. tish-lsp uses the same tish_lint library for editor diagnostics.

Install

cargo build --release -p tishlang_lint
# Binary: target/release/tish-lint

CLI

tish-lint src/main.tish
tish-lint src/

SARIF (e.g. GitHub Code Scanning): --format sarif writes a single SARIF 2.1.0 document to stdout.

tish-lint --format sarif src/ > tish-lint.sarif

Exit codes: non-zero if any file fails to parse or reports error-severity issues.

Output:

path/to/file.tish:LINE:COL: warning [RULE_ID] message

Rule catalog

IDSeverityDescription
tish-empty-catchWarningEmpty catch block.
tish-duplicate-keyWarningDuplicate keys in an object literal.

Security tooling repo layout

The tish-security companion repository (keep it next to your tish checkout) holds shared .tish fixtures, OpenGrep / ast-grep / Comby examples, a Codacy Docker scaffold, and CI snippets. The compiler repo’s workflow still runs tish-lint on in-tree examples.

CI example

- name: Lint Tish sources
  run: tish-lint ./src
- run: tish-fmt --check src/main.tish && tish-lint src/

Improve this documentation