deep-nesting#
Warns when code exceeds the recommended nesting depth threshold.
Run `tangu lint` or `tangu fix` across any `.tan`, `.data.tan`, `#shtml`, or `#css` workspace. Suppress a rule on the following form using `; #allow(<code>)`.
deep-nesting#Warns when code exceeds the recommended nesting depth threshold.
too-many-parameters#Warns when functions exceed the recommended parameter count threshold.
cond-unreachable-clauses#Detects unreachable clauses in `cond` and `when` expressions.
discarded-continue-value#Warns when `(continue val)` passes a value inside a loop that discards it.
division-by-zero#Detects division or modulo by constant zero literals.
duplicate-cond-predicate#Detects duplicated predicates in `cond` branches.
duplicate-def-in-block#Detects duplicate `def` declarations and `def`/`let` collisions within the same block scope.
duplicate-map-keys#Detects duplicate keys in Map literals.
duplicate-set-entries#Detects duplicate entries in Set literals.
duplicate-when-patterns#Detects duplicate `when` patterns or unreachable branches.
for-in-value-position#Warns when `(for ...)` is used in a value-producing position where `for->seq` is required.
hardcoded-secret#Warns when credential-named variables or map keys are assigned hardcoded string literals.
i18n-bundle-parity#Validates key, plural `:other`, and `{placeholder}` parity across locales in `Bundle`.
impossible-branch#Detects conditional branches that can never execute.
ineffective-none-guard#Detects None checks that fail to guard against nil dereferences.
invalid-struct-field-constraint#Warns about invalid, contradictory, or type-mismatched struct field constraints.
invalid-struct-literal-value#Warns about literal struct arguments that violate field constraint annotations.
missing-else-wrapper#Detects 3-argument `(if cond then else)` expressions where the 2nd branch is missing `(else ...)`.
shell-injection#Warns when interpolating or concatenating dynamic values into shell command strings passed to `process/exec` or `process/shell`.
suspicious-equality#Warns when equality checks compare incompatible types.
suspicious-try#Detects `(try ...)` on optional lookups where `()` early-returns prematurely.
tautological-boolean#Detects tautological or contradictory boolean expressions (e.g. `(and a a)`).
test-assertions#Detects unasserted comparison expressions in `#test` functions and test functions with zero assertions.
css-empty-rule#Detects empty CSS rules with no declarations and no nested child rules.
css-shorthand-override#Detects CSS shorthand properties declared after their constituent longhand properties in the same rule.
css-unknown-custom-property#Warns when `var(--token)` references a CSS custom property not defined locally or in workspace CSS tokens.
css-zero-length-unit#Suggests omitting redundant length units on zero values (e.g. `"0"` instead of `"0px"`).
html-accessible-name#Ensures interactive elements (<button>, <a>) have accessible text or aria-label.
html-anchor-valid-href#Flags anchor tags with missing or dummy href attributes (such as # or javascript:).
html-aria-validity#Flags invalid/misspelled ARIA roles and attributes, and redundant roles on semantic HTML tags.
html-boolean-attribute-strings#Flags boolean attributes assigned string values ("false" or "true") and provides autofix to boolean literals.
html-button-missing-type#Ensures <button> elements explicitly declare a :type attribute ("button", "submit", or "reset").
html-conflicting-id#Detects conflicting element IDs when both a tag shortcut `#id` and an `:id` attribute (or multiple `#id` shortcuts) are specified on the same element.
html-deprecated-elements#Flags obsolete and deprecated HTML tags (e.g. marquee, font, center, strike, tt).
html-duplicate-class#Detects duplicate CSS class names in element tag shortcuts or `:class` attributes.
html-duplicate-id#Flags duplicate static HTML element IDs in the same template tree.
html-img-missing-alt#Requires <img> elements to have an alt attribute.
html-input-missing-label#Ensures form inputs (<input>, <select>, <textarea>) are associated with a label.
html-invalid-nesting#Detects invalid parent-child element nesting forbidden by HTML5.
html-no-inline-event-handlers#Disallows inline DOM event handler attributes (e.g. `:onclick`, `:onsubmit`) in favor of `addEventListener` in module scripts.
html-prefer-semantic-elements#Suggests replacing generic <div> elements with native semantic landmark elements (header, nav, main, footer, aside, article).
html-target-blank-rel#Ensures <a> elements with target="_blank" specify rel="noopener noreferrer" to prevent security risks.
html-unsafe-raw#Warns when unescaped string interpolation or concatenation is used inside `:!raw` or `#html` strings.
html-void-element-children#Flags void elements containing child elements or text content.
deprecated-usage#Detects usage of functions, modules, or bindings marked with `@deprecated`.
duplicate-function-parameter-names#Detects duplicate parameter names in function signatures.
duplicate-imports#Detects duplicate `use` statements importing the same module or symbol.
empty-import#Disallows empty brace imports `(use {} /mod)`; use `(use _ /mod)` for side-effect-only imports.
forbidden-dot-imports#Warns against using forbidden trailing dot imports `(use ... .)`.
invalid-lazy-import#Reports `#lazy` `(use ...)` forms that are unsupported at runtime.
nonexistent-modules#Detects `use` statements importing from non-existent modules.
redundant-prelude-imports#Warns when importing symbols that are already available in the standard prelude.
same-directory-use#Warns about redundant module prefixes when using sibling files.
shadowing-globals#Warns when local variables shadow prelude symbols or top-level module definitions.
shadowing-imports#Warns when local definitions shadow imported symbols.
undefined-imported-names#Detects imports of symbols that are not exported by target modules.
undefined-variables#Detects references to variables that are not defined in the current scope.
unsorted-imports#Enforces that top-level (use ...) imports are sorted alphabetically by module path within contiguous import blocks.
accumulating-concat-in-loop#Detects quadratic O(N^2) string or array concatenation reassignment inside a loop body.
prefer-iter-find-or-any#Suggests lazy `(iter/find ...)` or `(iter/any? ...)` instead of materializing `(iter/filter ...)` just to inspect the first element or emptiness.
collapsible-if#Suggests collapsing nested `if` statements into a single `if` with `and`.
dead-reassignment#Detects variables reassigned before their previous value was used.
discarded-for-seq#Detects `(for->seq ...)` in statement positions where the generated Array is dropped.
needless-return#Suggests removing explicit `(return ...)` from tail expressions or redundant `()` in `(return ())`.
prefer-compact#Suggests using `(iter/compact xs)` instead of filtering with `is-some?`.
prefer-compound-assignment#Suggests using compound assignment operators (+<-, -<-, *<-, /<-) instead of verbose reassignment.
redundant-cast#Warns when an explicit `(cast Type expr)` call is redundant because `expr` already has type `Type`.
redundant-closure#Warns about redundant closures `(Func [x] (f x))` that can be simplified.
redundant-comparison-with-boolean#Warns about comparing expressions directly with boolean literals.
redundant-do#Warns about redundant `(do ...)` expressions inside sequences.
redundant-else#Warns about redundant `else` branches.
redundant-if-boolean#Warns about `(if cond true false)` patterns.
redundant-optional-field-wrap#Warns about redundant wrapping of optional struct fields.
redundant-unit#Suggests removing redundant `()` from the end of a function or block when it already returns `()`.
redundant-var-annotation#Warns about redundant type annotations on variable declarations.
self-binding#Warns when a variable is bound to itself without transformation.
unreachable-code#Detects expressions following unconditional jumps (return, throw).
unused-function-parameters#Detects function parameters that are never referenced.
unused-imports#Detects imported modules or names that are never referenced.
unused-loop-variable#Detects iteration variables in for or for->seq loops that are never referenced.
unused-values#Detects expressions evaluated in sequence whose results are discarded.
unused-variables#Detects variables that are declared with `let` but never referenced.
def-annotation-placement#Enforces that declaration attributes (#pub, #inline, #test, #(doc ...)) are placed preceding (def ...) rather than inside it.
def-destructuring#Warns when `def` is used for pattern destructuring instead of `let`.
func-signature-convention#Enforces canonical Func parameter syntax: nullary functions use (), single parameters unwrap brackets, and multi-parameters use [a b ...].
missing-doc#Warns about missing documentation comments on public functions and types.
names#The symbol naming convention lint (kebab-case, lengths, valid identifiers).
predicate-and-boolean-naming#Enforces that predicate functions end with `?`, while variables, parameters, and map keys do not end with `?`.
prefer-colon-shorthand#Suggests using colon shorthand syntax for keyword args and properties.
prefer-cond-over-if#Suggests using `(cond ...)` when multiple nested `if` expressions are chained.
prefer-is-a#Suggests using `(is-a? ...)` for type checking patterns.
prefer-is-empty#Suggests using `(is-empty? ...)` over `(== (count-of ...) 0)`.
prefer-multi-remove#Suggests using multi-key (remove coll k1 k2 ...) instead of nested (remove (remove coll k1) k2) calls.
prefer-not-equal#Suggests using `(!= a b)` instead of `(not (== a b))`.
prefer-optional-key-path#Suggests using optional key path syntax.
prefer-put-all#Suggests using `put-all` instead of multiple consecutive `put` calls.
prefer-range-shorthand#Suggests using range shorthand syntax `0..10` over `(range 0 10)`.
prefer-say#Suggests using `(say ...)` instead of the legacy `(echo ...)` alias for console output.
prefer-some-or#Suggests using `(some-or ...)` instead of verbose None checking.
prefer-string-interpolation#Suggests using string template interpolation instead of `concat` / `format`.
prefer-unless#Suggests using `(unless ...)` over `(if (not ...) ...)`.
prefer-when-over-cond#Suggests using `(when ...)` for single branch conditions.
sql-interpolation#Warns about improper string interpolation in SQL queries.
struct-and-trait-naming#Enforces capitalized kebab-case for multi-word structs and traits.
struct-field-annotation-convention#Enforces canonical kebab-case naming for struct field annotation keys.
top-level-let-function#Suggests top-level function definitions.
triple-quotes#Suggests using triple-quotes `"""` for multi-line strings.
missing-trait-bound#Warns about missing trait bounds on generic parameters.
missing-var-annotation#Warns when variable bindings lack required type annotations.
mut-param-requires-mut#Warns when a mutable parameter does not have mutable binding.