Skip to main content

Style

Rules relating to code style.

IDSummary
avoid-get-and-list-prefix

Avoid get_ and list_ prefix for rules and functions

chained-rule-body

Avoid chaining rule bodies

comprehension-term-assignment

Assignment can be moved to comprehension term

default-over-else

Prefer default assignment over fallback else

default-over-not

Prefer default assignment over negated condition

detached-metadata

Detached metadata annotation

double-negative

Avoid double negatives

external-reference

External reference in function

file-length

Max file length exceeded

function-arg-return

Return value assigned in function argument

line-length

Line too long

messy-rule

Messy incremental rule

mixed-iteration

Mixed iteration style

no-whitespace-comment

Comment should start with whitespace

Automatically fixable: Yes

opa-fmt

File should be formatted with opa fmt

Automatically fixable: Yes

pointless-reassignment

Pointless reassignment of variable

prefer-snake-case

Prefer snake_case for names

prefer-some-in-iteration

Prefer some .. in for iteration

rule-length

Max rule length exceeded

rule-name-repeats-package

Avoid repeating package path in rule names

todo-comment

Avoid TODO Comments

trailing-default-rule

Default rule should be declared first

unconditional-assignment

Unconditional assignment in rule body

unnecessary-some

Unnecessary use of some

use-assignment-operator

Prefer := over = for assignment

Automatically fixable: Yes

yoda-condition

Yoda condition, it is