Skip to main content

Bugs

Rules that detect bugs in your code.

RuleSummary
bugs/annotation-without-metadataAnnotation without metadata
bugs/argument-always-wildcardArgument is always a wildcard
bugs/constant-conditionConstant condition
bugs/deprecated-builtinConstant condition
bugs/duplicate-ruleDuplicate rule
bugs/if-empty-objectEmpty object following `if`
bugs/if-object-literalObject literal following `if`
bugs/import-shadows-ruleImport shadows rule
bugs/impossible-notImpossible `not` condition
bugs/inconsistent-argsInconsistently named function arguments
bugs/internal-entrypointEntrypoint can't be marked internal
bugs/invalid-metadata-attributeInvalid attribute in metadata annotation
bugs/leaked-internal-referenceOutside reference to internal rule or function
bugs/not-equals-in-loopUse of != in loop
bugs/redundant-existence-checkRedundant existence check
bugs/redundant-loop-countRedundant count before loop
bugs/rule-assigns-defaultRule assigned its default value
bugs/rule-named-ifRule named `if`
bugs/rule-shadows-builtinRule name shadows built-in
bugs/sprintf-arguments-mismatchMismatch in `sprintf` arguments count
bugs/time-now-ns-twiceRepeated calls to `time.now_ns`
bugs/top-level-iterationIteration in top-level assignment
bugs/unassigned-return-valueNon-boolean return value unassigned
bugs/unused-output-variableUnused output variable
bugs/var-shadows-builtinVariable shadows built-in
bugs/zero-arity-functionAvoid functions without args