VariableName
Identifies variable names that don't adhere to a selected naming convention. Supports snake_case (default), camelCase, PascalCase, and kebab-case.
Anchor to ExamplesExamples
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.
Anchor to ✗ Fail✗ Fail
{% assign variable-name = 1 %}
Anchor to ✓ Pass✓ Pass
{% assign variable_name = 1 %}
Anchor to OptionsOptions
VariableName
enabledtrue
severity warning
format snake_case
Parameter | Description |
---|---|
enabled | Whether this check is enabled. |
severity | The severity of the check. |
format | The 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?