Skip to content

Commit

Permalink
Always enable the styleguide links to provide better docs
Browse files Browse the repository at this point in the history
We have documented each cop. This way we link to those docs.

Signed-off-by: Tim Smith <tsmith@chef.io>
  • Loading branch information
tas50 committed Jan 31, 2021
1 parent 9ccb912 commit 56c8527
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bin/cookstyle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@ unless ARGV.include?('--fail-level')
ARGV << 'C'
end

# if only -v is passed we'll get 3 args (-v, --fail-level, and C)
if ARGV.size == 3 && %w(-v --version).include?(ARGV.first)
# we want to link to our docs
unless ARGV.include?('--display-style-guide')
ARGV << '--display-style-guide'
end

# if only -v is passed we'll get 4 args (-v, --fail-level. --display-style-guide, and C)
if ARGV.size == 4 && %w(-v --version).include?(ARGV.first)
puts "Cookstyle #{Cookstyle::VERSION}"
print ' * RuboCop '
end
Expand Down

0 comments on commit 56c8527

Please sign in to comment.