| 1. |
What is Cookstyle in Chef? |
|
Answer» Cookstyle is an in-built linting tool that checks for
Cookstyle is based on RuboCop Ruby linting tool. Cookstyle is run from the command line against a cookbook and verifies all the Ruby files in the cookbook. Cookstyle is run as cookstyle <cookbook path> and the output is PROVIDED via STANDARD output on the terminal. The output gives us information about the number of files present and verified, defects detected and place of defects. The result of the verification of the files is shown below:
Autocorrection facility is available for files with cookstyle warnings but care must be taken not to alter the functionality of the code after using auto-correction. Default SETTINGS in the cookstyle could be overridden by .rubocop.yml file in a cookbook. |
|