Skip to content

Commit

Permalink
reset boolean flags on each loop of changed cookbooks
Browse files Browse the repository at this point in the history
Precommit-Verified: 4a479fb5a8fcbf07a78d1961dcfaaf65f293bb30adc91c7897fda504db57ce8e
  • Loading branch information
Matt Kulka committed Jul 22, 2019
1 parent 3842aa6 commit 2d182c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To check Chef cookbook version bumps, use the `chef-cookbook-version` hook. Each
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.

- repo: https://github.com/mattlqx/pre-commit-ruby
rev: v1.2.5
rev: v1.2.6
hooks:
- id: rubocop
- id: foodcritic
Expand Down
4 changes: 3 additions & 1 deletion bin/cookbook-wrapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ def method_missing(sym, *args, &_block) # rubocop:disable Metrics/AbcSize, Style

# Check each changed file for a metadata file in its heirarchy
success = true
autofix = false
changed_cookbooks = []
ARGV.each do |file|
cookbook, type = metadata_walk(file)
Expand All @@ -94,6 +93,9 @@ def method_missing(sym, *args, &_block) # rubocop:disable Metrics/AbcSize, Style

IO.popen('git fetch origin') { |_f| true }
changed_cookbooks.each do |cb_data|
success = true
autofix = false

cookbook = cb_data[0]
type = cb_data[1]

Expand Down

0 comments on commit 2d182c9

Please sign in to comment.