Skip to main content

Style

Rules relating to code style.

IDSummary
style/avoid-get-and-list-prefix

Avoid get_ and list_ prefix for rules and functions

style/chained-rule-body

Avoid chaining rule bodies

style/comprehension-term-assignment

Assignment can be moved to comprehension term

style/default-over-else

Prefer default assignment over fallback else

style/default-over-not

Prefer default assignment over negated condition

style/detached-metadata

Detached metadata annotation

style/double-negative

Avoid double negatives

style/external-reference

External reference in function

style/file-length

Max file length exceeded

style/function-arg-return

Return value assigned in function argument

style/line-length

Line too long

style/messy-rule

Messy incremental rule

style/mixed-iteration

Mixed iteration style

style/no-whitespace-comment

Comment should start with whitespace

Automatically fixable: Yes

style/opa-fmt

File should be formatted with opa fmt

Automatically fixable: Yes

style/pointless-reassignment

Pointless reassignment of variable

style/prefer-snake-case

Prefer snake_case for names

style/prefer-some-in-iteration

Prefer some .. in for iteration

style/rule-length

Max rule length exceeded

style/rule-name-repeats-package

Avoid repeating package path in rule names

style/todo-comment

Avoid TODO Comments

style/trailing-default-rule

Default rule should be declared first

style/unconditional-assignment

Unconditional assignment in rule body

style/unnecessary-some

Unnecessary use of some

style/use-assignment-operator

Prefer := over = for assignment

Automatically fixable: Yes

style/yoda-condition

Yoda condition, it is