php bin/console lint:yaml
Lint a YAML file and outputs encountered errors
Usage
lint:yaml [--format FORMAT] [--exclude EXCLUDE] [--parse-tags|--no-parse-tags] [--] [<filename>...]
                            Arguments
filename   A file, a directory or "-" for reading from STDIN 
            
                        Options
      --format       The output format 
      --exclude      Path(s) to exclude 
      --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
You can also exclude one or more specific files:
  php bin/console lint:yaml dirname --exclude="dirname/foo.yaml" --exclude="dirname/bar.yaml"
Or find all files in a bundle:
  php bin/console lint:yaml @AcmeDemoBundle