Skip to content

Check VariableNaming

github-actions[bot] edited this page Nov 22, 2024 · 5 revisions

Give variable a proper descriptive name, consisting of a least 3 characters and a maximum of 32 characters (excluding prefix).

Non-compliant Code Example

_local a << 1
_local l_b << 1
_local a_very_long_variable_name_that_is_not_descriptive_anymore << 1

Compliant Code Example

_local count << 1
_local index << 1
_local total << 1

Options

Option Default value Description
variable-naming.min-length 3 Minimum number of characters for a variable name
variable-naming.max-length 32 Maximum number of characters for a variable name
variable-naming.whitelist x, y, z Whitelist of variable names to allow/ignore, separated by ','

Note

This page is generated. Any changes made to this page through the wiki will be lost in the future.