Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ton-blockchain/acton/llms.txt

Use this file to discover all available pages before exploring further.

acton check runs the Tolk linter over the whole project, a specific contract from Acton.toml, or a single .tolk file. In addition to plain human-readable output, it supports machine-readable formats for CI pipelines, code-quality dashboards, and IDE integrations. Auto-fix mode can apply safe rewrites in one pass.

Synopsis

acton check [OPTIONS] [TARGET]
TARGET is either a contract name from Acton.toml or a path to a .tolk file. When omitted, Acton checks all contracts, workspace test files, and standalone script roots that define main().

Arguments & options

Check options

FlagTypeDefaultDescription
[TARGET]string | pathContract name from Acton.toml or path to a .tolk file. Targets ending in .tolk are treated as file paths; other values are resolved as contract names.
--fixflagfalseApply available auto-fixes. Works only in plain output mode.
--output-format <FORMAT>plain | json | sarif | github | gitlabplainOutput format for diagnostics. Resolution order: CLI flag → [lint].output-formatplain.
--output-file <PATH>pathstdoutWrite output to a file instead of standard output. Not valid with plain format.
--enable-only <CODE[,CODE...]>stringEnable only selected lint rules. Selected allow rules are re-enabled at their default severity; all other rules are forced to allow. Repeatable.
--explain <CODE>stringPrint a human-readable explanation for a lint rule code.

Global flags

FlagTypeDefaultDescription
--color <WHEN>auto | always | neverautoControl coloured output.
--manifest-path <PATH>pathPath to Acton.toml. Conflicts with --project-root.
--project-root <PATH>pathPath to project root. Conflicts with --manifest-path.

Output formats

Human-readable diagnostics with source context, compatible with --fix.
acton check
acton check --fix

Behaviour notes

  • Project-wide discovery includes workspace *.test.tolk files and standalone script roots that define main().
  • Discovery skips .git, .github, .idea, .acton, node_modules, target, tolk-stdlib, .codex, and .claude.
  • Contracts with non-.tolk sources (e.g. precompiled .boc entries) are not lint roots.
  • Single-file mode relaxes rule E010 (acton-import-in-contract).
  • Inline suppressions use rule names:
    // check-disable-next-line unused-variable, write-only-variable
    
  • Compiler and parser diagnostics (compiler-error, parse-error) cannot be suppressed with check-disable-next-line.
  • --fix applies only the first available fix per diagnostic and only for rules marked as auto-fixable. Unfixed diagnostics remain in the report and still contribute to the exit code.
  • --enable-only selectors must resolve to exactly one rule — use full codes such as E002 for stability.

Examples

acton check

CI recipe

.github/workflows/ci.yml
- name: Lint
  run: acton check --output-format github
Use acton check --explain <CODE> to understand why a rule fires before deciding whether to suppress or fix it.

Build docs developers (and LLMs) love