Class: RuboCop::Cop::Codeur::RailsAppPatterns
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Codeur::RailsAppPatterns
- Defined in:
- lib/rubocop/cop/codeur/rails_app_patterns.rb
Overview
This cop makes sure that Rails app only uses patterns (app subdirectories) defined in Cop config.
Constant Summary collapse
- MSG_FORBIDDEN =
'`%<pattern>s` are forbidden.'- MSG_NOT_ALLOWED =
'`%<pattern>s` are not allowed. Allowed patterns are: %<allowed_patterns>s.'
Instance Method Summary collapse
Instance Method Details
#on_new_investigation ⇒ Object
33 34 35 36 37 38 |
# File 'lib/rubocop/cop/codeur/rails_app_patterns.rb', line 33 def on_new_investigation file_path = processed_source.file_path return if config.file_to_exclude?(file_path) for_bad_patterns(file_path) { |msg| add_global_offense(msg, severity: :warning) } end |