Code Inspections in YAML
This topic lists all PhpStorm code inspections available in YAML.
You can toggle specific inspections or change their severity level on the Editor | Inspections page of the IDE settings Ctrl+Alt+S.
Inspection | Description | Default Severity |
---|---|---|
Reports deprecated keys in YAML files.
{
"properties": {
"SomeDeprecatedProperty": {
"deprecationMessage": "Baz",
"description": "Foo bar"
}
}
}
The following is an example with the corresponding warning:
SomeDeprecatedProperty: some value
| Weak warning | |
Reports duplicated keys in YAML files.
same_key: some value
same_key: another value
| Error | |
Reports recursion in YAML aliases.
some_key: &some_anchor
sub_key1: value1
sub_key2: *some_anchor
| Error | |
Reports unresolved aliases in YAML files.
some_key: *unknown_alias
| Error | |
Reports unused anchors.
some_key: &some_anchor
key1: value1
| Warning | |
Reports inconsistencies between a YAML file and a JSON Schema if the schema is specified.
{
"properties": {
"SomeNumberProperty": {
"type": "number"
}
}
}
The following is an example with the corresponding warning:
SomeNumberProperty: hello world
| Warning |