You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,16 +8,17 @@ Hooks require that `bundle` be already available on your system.
8
8
9
9
To lint Ruby changes in your repo, use the `rubocop` hook. The root of your repo must have a `Gemfile` that includes the desired version of rubocop. It will be installed via Bundler prior to linting. Rubocop will only be run against changed files for each commit.
10
10
11
-
To lint Chef changes in your repo, use the `foodcritic` hook. The root of your repo must have a `Gemfile` that includes the desired version of foodcritic. It will be installed via Bundler prior to linting. Foodcritic will only be run against cookbooks with changes to Chef code; this does not include the libraries directory of a cookbook.
11
+
To lint Chef changes in your repo, use the `foodcritic`or `cookstyle`hook. The root of your repo must have a `Gemfile` that includes the desired version of foodcritic or cookstyle. It will be installed via Bundler prior to linting. Foodcritic will only be run against cookbooks with changes to Chef code; this does not include the libraries directory of a cookbook. Cookstyle will be run against cookbooks and it's at the tools discretion of what actually gets checked. You may specify `--fix` as an argument for cookstyle for it to auto-fix any issues that it can.
12
12
13
13
To check Chef cookbook version bumps, use the `chef-cookbook-version` hook. Each changed cookbook will have its `metadata.rb` or `metadata.json` checked to determine if its version has been increased. If not, it will automatically be fixed with the patch-level incremented.
14
14
15
15
To unit test Ruby changes in your repo, use the `rspec` hook. Each path in your repo with a `spec` directory should have a `Gemfile` that includes your desired version of rspec (or a derivative library). It will be installed via Bundler prior to testing. Rspec will only be run against the closest directory in a changed file's path with a spec dir.
0 commit comments