Class: RuboCop::Cop::Cask::StanzaGrouping

Inherits:
Base
  • Object
show all
Extended by:
AutoCorrector, Forwardable
Includes:
RangeHelp, CaskHelp
Defined in:
rubocops/cask/stanza_grouping.rb

Overview

This cop checks that a cask’s stanzas are grouped correctly.

Constant Summary collapse

MISSING_LINE_MSG =
"stanza groups should be separated by a single " \
"empty line"
EXTRA_LINE_MSG =
"stanzas within the same group should have no lines " \
"between them"

Instance Method Summary collapse

Methods included from CaskHelp

#on_block

Instance Method Details

#on_cask(cask_block) ⇒ Object



23
24
25
26
27
# File 'rubocops/cask/stanza_grouping.rb', line 23

def on_cask(cask_block)
  @cask_block = cask_block
  @line_ops = {}
  add_offenses
end