php bin/console lint:yaml
Lints a file and outputs encountered errors
Usage
lint:yaml [--format FORMAT] [--parse-tags] [--] [<filename>]
Arguments
filename A file or a directory or STDIN
Options
--format The output format
--parse-tags Parse custom tags
Help
The lint:yaml command lints a YAML file and outputs to STDOUT
the first encountered syntax error.
You can validates YAML contents passed from STDIN:
cat filename | php bin/console lint:yaml
You can also validate the syntax of a file:
php bin/console lint:yaml filename
Or of a whole directory:
php bin/console lint:yaml dirname
php bin/console lint:yaml dirname --format=json
Or find all files in a bundle:
php bin/console lint:yaml @AcmeDemoBundle