YAML error checking

Add site-package yamllint to inspect YAML/YML files for errors.

pip install –user yamllint

Yamllint has two default configuration files: default.yaml and relaxed.yaml with pre-set rules. Can extend a configuration file and alter one of the rules.

Mylint.yaml:

# Mylint.yaml is my own configuration file for yamllint
# It extends the default.yaml by adjusting some options.

extends: default

rules:
new-lines: disable

###

Did this to avoid the error about the EOL character on the first line (—).

1:4 error wrong new line character: expected \n (new-lines)

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s