Class: Reviewer::Doctor::KeywordCheck
- Inherits:
-
Object
- Object
- Reviewer::Doctor::KeywordCheck
- Defined in:
- lib/reviewer/doctor/keyword_check.rb
Overview
Detects conflicts between configured tool names, tags, and reserved keywords
Constant Summary collapse
- RESERVED =
Arguments::Keywords::RESERVED
Instance Attribute Summary collapse
-
#report ⇒ Object
readonly
Returns the value of attribute report.
Instance Method Summary collapse
-
#check ⇒ Object
Checks for keyword conflicts between tool names, tags, and reserved keywords.
-
#initialize(report, configuration:, tools:) ⇒ KeywordCheck
constructor
Creates a keyword check that scans for keyword conflicts in configuration.
Constructor Details
#initialize(report, configuration:, tools:) ⇒ KeywordCheck
Creates a keyword check that scans for keyword conflicts in configuration
17 18 19 20 21 |
# File 'lib/reviewer/doctor/keyword_check.rb', line 17 def initialize(report, configuration:, tools:) @report = report @configuration = configuration @tools = tools end |
Instance Attribute Details
#report ⇒ Object (readonly)
Returns the value of attribute report.
7 8 9 |
# File 'lib/reviewer/doctor/keyword_check.rb', line 7 def report @report end |
Instance Method Details
#check ⇒ Object
Checks for keyword conflicts between tool names, tags, and reserved keywords
24 25 26 27 28 29 30 31 32 |
# File 'lib/reviewer/doctor/keyword_check.rb', line 24 def check return unless @configuration.file.exist? check_tool_names_vs_reserved rescue Configuration::Loader::MissingConfigurationError # Tools may reference a stale config path — nothing to check end |