Module: RuboCop::Chef::CookbookOnly
- Extended by:
- ClassMethods
- Defined in:
- lib/rubocop/chef/cookbook_only.rb
Overview
Mixin for cops that skips non-cookbook files
The criteria for whether cookstyle analyzes a certain ruby file is configured via ‘AllCops/Chef`. For example, if you want to customize your project to scan all files within a `test/` directory then you could add this to your configuration:
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- DEFAULT_CONFIGURATION =
CONFIG.fetch('AllCops')
- COOKBOOK_SEGMENTS =
%w(attributes definitions libraries metadata providers recipes resources).freeze
Instance Attribute Summary
Attributes included from ClassMethods
Instance Method Summary collapse
Methods included from ClassMethods
Instance Method Details
#relevant_file?(file) ⇒ Boolean
24 25 26 |
# File 'lib/rubocop/chef/cookbook_only.rb', line 24 def relevant_file?(file) cookbook_pattern =~ file && super end |