chef / cookstyle

A linting tool that helps you to write better Chef Infra cookbooks and InSpec profiles by detecting and automatically correcting style, syntax, and logic mistakes in your code.
Apache License 2.0
109 stars 54 forks source link

File verifier used without `%{path}` #896

Open lamont-granquist opened 3 years ago

lamont-granquist commented 3 years ago

For file/template/cookbook_file/remote_file

The verifier should have the path of the tempfile:

# good
verify 'nginx -t -c %{path}'

Pretty sure if you leave it off that's always a bug and probably will validate the old config rather than the new or some kind of nonsense:

# bad
verify 'nginx -t'

Cannot be autocorrected because we can't guess what the right command is.