Class: RuboCop::Cop::Itamae::RecipePath
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Itamae::RecipePath
- Includes:
- RangeHelp
- Defined in:
- lib/rubocop/cop/itamae/recipe_path.rb
Overview
Checks whether the recipe is placed under cookbooks
dir
or roles
dir.
Constant Summary collapse
- MSG =
'Prefer recipe to placed under `cookbooks` dir' \ ' or `roles` dir.'
Instance Method Summary collapse
Instance Method Details
#on_new_investigation ⇒ Object
26 27 28 29 30 31 |
# File 'lib/rubocop/cop/itamae/recipe_path.rb', line 26 def on_new_investigation file_path = processed_source.file_path return if config.file_to_include?(file_path) add_global_offense if bad_filename?(file_path) end |