Skip to main content

Style

Rules relating to code style.

RuleSummary
style/avoid-get-and-list-prefixAvoid `get_` and `list_` prefix for rules and functions
style/chained-rule-bodyAvoid chaining rule bodies
style/comprehension-term-assignmentAssignment can be moved to comprehension term
style/default-over-elsePrefer default assignment over fallback `else`
style/default-over-notPrefer default assignment over negated condition
style/detached-metadataDetached metadata annotation
style/double-negativeAvoid double negatives
style/external-referenceExternal reference in function
style/file-lengthMax file length exceeded
style/function-arg-returnReturn value assigned in function argument
style/line-lengthLine too long
style/messy-ruleMessy incremental rule
style/mixed-iterationMixed iteration style
style/no-whitespace-commentComment should start with whitespace
style/opa-fmtFile should be formatted with `opa fmt`
style/pointless-reassignmentPointless reassignment of variable
style/prefer-snake-casePrefer snake_case for names
style/prefer-some-in-iterationPrefer `some .. in` for iteration
style/rule-lengthMax rule length exceeded
style/rule-name-repeats-packageAvoid repeating package path in rule names
style/todo-commentAvoid TODO Comments
style/trailing-default-ruleDefault rule should be declared first
style/unconditional-assignmentUnconditional assignment in rule body
style/unnecessary-someUnnecessary use of `some`
style/use-assignment-operatorPrefer `:=` over `=` for assignment
style/yoda-conditionYoda condition, it is