Class: RuboCop::Cop::Cask::Desc
- Inherits:
-
RuboCop::Cop
- Object
- RuboCop::Cop
- RuboCop::Cop::Cask::Desc
- Includes:
- OnDescStanza, DescHelper
- Defined in:
- Library/Homebrew/rubocops/cask/desc.rb
Overview
This cop audits desc
in casks.
See the DescHelper module for details of the checks.
Constant Summary
Constants included from DescHelper
DescHelper::MAX_DESC_LENGTH, DescHelper::VALID_LOWERCASE_WORDS
Instance Method Summary collapse
Methods included from DescHelper
#audit_desc, #autocorrect_desc
Methods included from HelperFunctions
#line_number, #line_start_column, #problem, #regex_match_group, #source_buffer, #start_column, #string_content
Methods included from OnDescStanza
Methods included from CaskHelp
Instance Method Details
#autocorrect(node) ⇒ Object
24 25 26 27 |
# File 'Library/Homebrew/rubocops/cask/desc.rb', line 24 def autocorrect(node) name = cask_block.header.cask_token autocorrect_desc(node, name) end |
#on_desc_stanza(stanza) ⇒ Object
18 19 20 21 22 |
# File 'Library/Homebrew/rubocops/cask/desc.rb', line 18 def on_desc_stanza(stanza) name = cask_block.header.cask_token desc_call = stanza.stanza_node audit_desc(:cask, name, desc_call) end |