Exception: Reek::Errors::GarbageDetectorConfigurationInCommentError
- Inherits:
-
BaseError
- Object
- RuntimeError
- BaseError
- Reek::Errors::GarbageDetectorConfigurationInCommentError
- Defined in:
- lib/reek/errors/garbage_detector_configuration_in_comment_error.rb
Overview
Gets raised when trying to use a configuration for a detector that can’t be parsed into a hash.
Constant Summary collapse
- BAD_DETECTOR_CONFIGURATION_MESSAGE =
<<-MESSAGE.freeze Error: You are trying to configure the smell detector '%<detector>s'. Unfortunately we cannot parse the configuration you have given. The source is '%<source>s' and the comment belongs to the expression starting in line %<line>d. Here's the original comment: %<comment>s Please see the Reek docs for: * how to configure Reek via source code comments: #{DocumentationLink.build('Smell Suppression')} * what smell detectors are available: #{DocumentationLink.build('Code Smells')} Update the offensive comment (or remove it if no longer applicable) and re-run Reek. MESSAGE
Instance Method Summary collapse
-
#initialize(detector_name:, source:, line:, original_comment:) ⇒ GarbageDetectorConfigurationInCommentError
constructor
A new instance of GarbageDetectorConfigurationInCommentError.
Methods inherited from BaseError
Constructor Details
#initialize(detector_name:, source:, line:, original_comment:) ⇒ GarbageDetectorConfigurationInCommentError
Returns a new instance of GarbageDetectorConfigurationInCommentError.
27 28 29 30 31 32 33 34 |
# File 'lib/reek/errors/garbage_detector_configuration_in_comment_error.rb', line 27 def initialize(detector_name:, source:, line:, original_comment:) = format(BAD_DETECTOR_CONFIGURATION_MESSAGE, detector: detector_name, source: source, line: line, comment: original_comment) super() end |