Skip to main content

VariableName

Identifies variable names that don't adhere to a selected naming convention. Supports snake_case (default), camelCase, PascalCase, and kebab-case.


The following examples contain code snippets that either fail or pass this check. In the following examples, the default snake_case naming convention is used.

{% assign variable-name = 1 %}

{% assign variable_name = 1 %}

VariableName:
enabled: true
severity: warning
format: snake_case
ParameterDescription
enabledWhether this check is enabled.
severityThe severity of the check.
formatThe naming convention that the check uses to validate variable names.

Anchor to Disabling this checkDisabling this check

This check is safe to disable.


Was this page helpful?