3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

yamllint

Last updated at Posted at 2017-12-25

CloudFormationのYAML対応により、AWS CLIでYAMLを扱う場合はそのバリデーションが必要になってきます。

ここではyamllintの導入方法を説明します。

リポジトリ: https://github.com/adrienverge/yamllint
ドキュメント: https://yamllint.readthedocs.io/en/latest/

1. インストール

コマンド
sudo pip install yamllint
コマンド
yamllint -v
結果(例)
yamllint 1.10.0
コマンド
which yamllint
結果(例)
/usr/local/bin/yamllint

2. 設定

CloudFormationのテンプレートをチェックするとdocument-startについてエラーが出るので、設定で抑制します。

コマンド
mkdir -p ~/.config/yamllint
コマンド
cat << EOF > ~/.config/yamllint/config
  rules:
    document-start:
      present: false
EOF

cat ~/.config/yamllint/config

3. 実行テスト

完了

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?