Acton
Linting rules

Overview

Reference for all Tolk linter checks

The acton check command validates your Tolk code and reports diagnostics for lint rules.

Use acton check --explain <CODE> to read a detailed explanation for any specific rule right in the terminal.

acton check --list-lint-rules also exists as a hidden machine-readable helper, but it only prints rule names and markdown descriptions. This index is the human-readable catalog with rule codes, lifecycle status, and quick-fix availability.

Lifecycle states currently used in the catalog are mainly Stable and Preview. The generator also supports future Deprecated and Removed statuses when rules eventually transition.

For setup, configuration, and CI usage, start with Linting.

CodeRuleStatusQuick fixWhat it does
C001compiler-errorStable since v0.0.1not availableReports compiler and parse errors.
E001field-init-can-be-foldedStable since v0.0.1always availableChecks for struct initialization where the field name and the variable used to initialize it are the same.
E002unused-variableStable since v0.0.1always availableChecks for variables and parameters that are declared but never used.
E003mutable-variable-can-be-immutableStable since v0.0.1sometimes availableChecks for variables that are declared as mutable (var) but are never mutated.
E004deprecated-symbol-useStable since v0.0.1not availableChecks for usage of deprecated symbols in code.
E005write-only-variableStable since v0.0.1not availableChecks for variables that are written to but never read.
E006unused-importStable since v0.0.1sometimes availableChecks for imports that are never used in the file.
E007pure-function-call-unusedStable since v0.0.1not availableChecks for calls to @pure functions where the result is not used.
E008no-bounce-handlerStable since v0.0.1not availableNo description provided.
E009method-can-be-staticStable since v0.0.1not availableChecks for instance methods where self is unnecessary.
E010used-ignored-identifierStable since v0.0.1always availableChecks for usages of identifiers explicitly marked as unused with a leading underscore.
E011message-should-be-namedStable since v0.0.1not availableChecks for messages created with createMessage(...) but named as generic msg.
E012create-message-inline-sendStable since v0.0.1not availableChecks for inline sending of newly created messages: createMessage(...).send(...).
E013mutable-parameter-can-be-immutableStable since v0.0.1always availableChecks for parameters that are declared as mutable (mutate) but are never mutated.
E014acton-import-in-contractStable since v0.0.1not availableForbids importing files from .acton in contract dependency trees.
E015asm-function-missing-safety-commentStable since v0.0.1not availableRequires documenting safety requirements for every declaration with an asm body.
E016send-mode-literalStable since v0.0.1sometimes availableWarns when send mode is passed as numeric literal instead of SEND_MODE_* constants.
E017unauthorized-accessPreview since v0.0.1sometimes availableDetects storage mutations (contract.setData(...), *.save()) that are reachable without a preceding admin sender check.
E018import-path-can-use-mappingsStable since v0.0.1sometimes availableWarns when a relative import path can be replaced with a configured @mapping/... path.
E019several-not-null-assertionsStable since v0.0.1always availableDetects repeated not-null assertions like foo!!.
E020reserve-mode-literalStable since v0.0.1sometimes availableWarns when reserve mode is passed as numeric literal instead of RESERVE_MODE_* constants.
E021dangerous-send-mode-missing-safety-commentStable since v0.0.1not availableRequires a SAFETY comment for msg.send(...) calls that use dangerous send-mode flags.
E022negated-is-type-can-use-not-isStable since v0.0.1always availableDetects negated type checks written as !(a is T).
E023bless-call-missing-safety-commentStable since v0.0.1not availableRequires a SAFETY comment for calls to transformSliceToContinuation and for calls to any asm function that uses BLESS.
E024random-requires-initializationPreview since v0.0.1sometimes availableRequires random generator initialization before random value generation calls.
E025divide-before-multiplyPreview since v0.0.1sometimes availableDetects cases where division is evaluated before multiplication.
E026duplicated-conditionStable since v0.0.1not availableDetects duplicated conditions in if / else if chains.
E027identical-conditional-branchesStable since v0.0.1not availableDetects conditionals where both branches are structurally identical.
E028no-global-variablesStable since v0.0.1not availableDisallows top-level global variable declarations.
E029incoming-messages-duplicate-opcodeStable since v0.0.1not availableChecks contract header field incomingMessages for duplicate message opcodes.
E030enum-cast-missing-safety-commentStable since v0.0.1not availableRequires a SAFETY comment for non-literal as casts to enum types.
E031missing-contract-headerStable since v0.0.1not availableWarns when a contract source defines standard contract entrypoints but omits the contract header.
E032unused-expressionStable since v0.0.1not availableWarns when an expression statement computes a value that is immediately discarded.
E033dict-type-useStable since v0.0.1not availableWarns when code uses the low-level dict type.
E034throw-requires-errors-enumStable since v0.0.1not availableWarns when symbolic throw codes are referenced as bare constants.
E035create-message-body-to-cellStable since v0.0.1not availableWarns about MyMessage { ... }.toCell() inside createMessage({ body: ... }) initializer.
E036throw-requires-documented-error-valuePreview since v0.0.1not availableRequires documentation for enum values used as throw codes.
S001name-case-checkerStable since v0.0.1always availableChecks identifier naming style and suggests consistent casing.
S002explicit-return-typeStable since v0.0.1sometimes availableRequires explicit return types for function declarations.

Last updated on