no-octal-values
What it does
Section titled “What it does”Reports a plain 0755 (octal to YAML 1.1 parsers, decimal 755 to YAML 1.2) or 0o755 (octal to YAML 1.2, a string to YAML 1.1). Quoted and tagged scalars are not checked. The options implicit and explicit choose which form is reported. No fix: the intended value is not known.
Why it matters
Section titled “Why it matters”The same text is a different number to different parsers: a file mode written as 0755 is 493 to one and 755 to the other, so the permissions come out wrong without an error.
To fix, quote the value (a string that the program converts itself) or write the decimal number.
Example
Section titled “Example”mode: 0755name: "0755"Configuration
Section titled “Configuration”github-actions: lint: rules: no-octal-values: level: warn # off, warn (default), error options: implicit: true explicit: trueyaml: lint: rules: no-octal-values: level: warn # off, warn (default), error options: implicit: true explicit: true| Option | Type | Default | Description |
|---|---|---|---|
implicit |
bool | true |
Report 0755. |
explicit |
bool | true |
Report 0o755. |
Enabled by the presets: yaml/yamllint.
Suppress one line with sudsy-disable-next-line no-octal-values in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| yamllint | octal-values |
full |
| yamllint | octal-values.forbid-implicit-octal / forbid-explicit-octal |
full |