Issy Long 1d65c942c3
rubocops/cask: Clean up unnecessary requires
- I suspect these were copy-pasted from other cops, like I did in
  https://github.com/Homebrew/brew/pull/14886#discussion_r1125569999.
- The "forwardable" require is unnecesary if the cop doesn't
  `extend Forwardable` and use `def_delegator`.
- The "uri" require is unnecessary if the cop doesn't call `URI` methods.
2023-03-05 17:13:46 +00:00

26 lines
596 B
Ruby

# typed: true
# frozen_string_literal: true
require "rubocops/cask/mixin/on_desc_stanza"
require "rubocops/shared/desc_helper"
module RuboCop
module Cop
module Cask
# This cop audits `desc` in casks.
# See the {DescHelper} module for details of the checks.
class Desc < Base
include OnDescStanza
include DescHelper
extend AutoCorrector
def on_desc_stanza(stanza)
@name = cask_block.header.cask_token
desc_call = stanza.stanza_node
audit_desc(:cask, @name, desc_call)
end
end
end
end
end