Skip to main content

Bugs

Rules that detect bugs in your code.

IDSummary
bugs/annotation-without-metadata

Annotation without metadata

bugs/argument-always-wildcard

Argument is always a wildcard

bugs/constant-condition

Constant condition

bugs/deprecated-builtin

Constant condition

bugs/duplicate-rule

Duplicate rule

bugs/if-empty-object

Empty object following if

bugs/if-object-literal

Object literal following if

bugs/import-shadows-rule

Import shadows rule

bugs/impossible-not

Impossible not condition

Type: Aggregate - runs both on single files as well as when more than one file is provided for linting

bugs/inconsistent-args

Inconsistently named function arguments

bugs/internal-entrypoint

Entrypoint can't be marked internal

bugs/invalid-metadata-attribute

Invalid attribute in metadata annotation

bugs/leaked-internal-reference

Outside reference to internal rule or function

bugs/not-equals-in-loop

Use of != in loop

bugs/redundant-existence-check

Redundant existence check

bugs/redundant-loop-count

Redundant count before loop

bugs/rule-assigns-default

Rule assigned its default value

bugs/rule-named-if

Rule named if

bugs/rule-shadows-builtin

Rule name shadows built-in

bugs/sprintf-arguments-mismatch

Mismatch in sprintf arguments count

bugs/time-now-ns-twice

Repeated calls to time.now_ns

bugs/top-level-iteration

Iteration in top-level assignment

bugs/unassigned-return-value

Non-boolean return value unassigned

bugs/unused-output-variable

Unused output variable

bugs/var-shadows-builtin

Variable shadows built-in

bugs/zero-arity-function

Avoid functions without args