escaped-quoted-scalar
Overview
This rule belongs to the yaml-syntax-validation ruleset and states that:
A quoted scalar value must be escaped properly. A scalar value (like a number, string, etc.) can be quoted in two styles: single or double. The double-quoted style provides escape sequences. The single-quoted style is useful when escaping is not needed. If your scalar value needs escaping, use double quotes and appropriate escape sequences.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Blocking |
| Message | While parsing a quoted scalar, an unknown escape character was found. |
| Code | YAMLSYNTAX_V050 |
| Type | Validation |
| Rule System | Syntax |
| Broad Category | Scalars |
| Tags | yaml data syntax preliminary checks validation yaml scalar quoted escape double quoted |
Suggested Fixes
- Ensure that the quoted value is escaped properly if any special characters are used.
- Make use of appropriate escape sequences to make your scalar value valid.
- Use double quotes around the scalar value when it uses escape sequences.