From fed668b330e151bde493e004d7c6ca57df4e19ff Mon Sep 17 00:00:00 2001 From: Gautham Goli Date: Wed, 3 May 2017 11:33:00 +0530 Subject: Add `--only-cops`,`--except-cops` options for brew style and simplify cop names --- Library/Homebrew/rubocops/bottle_block_cop.rb | 2 +- Library/Homebrew/rubocops/components_order_cop.rb | 4 ++-- Library/Homebrew/rubocops/components_redundancy_cop.rb | 2 +- Library/Homebrew/rubocops/formula_desc_cop.rb | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'Library/Homebrew/rubocops') diff --git a/Library/Homebrew/rubocops/bottle_block_cop.rb b/Library/Homebrew/rubocops/bottle_block_cop.rb index 2d6289cbb..f0c7d59bb 100644 --- a/Library/Homebrew/rubocops/bottle_block_cop.rb +++ b/Library/Homebrew/rubocops/bottle_block_cop.rb @@ -7,7 +7,7 @@ module RuboCop # # - `rebuild` should be used instead of `revision` in `bottle` block - class CorrectBottleBlock < FormulaCop + class BottleBlock < FormulaCop MSG = "Use rebuild instead of revision in bottle block".freeze def audit_formula(_node, _class_node, _parent_class_node, formula_class_body_node) diff --git a/Library/Homebrew/rubocops/components_order_cop.rb b/Library/Homebrew/rubocops/components_order_cop.rb index c66b5614e..a6259133d 100644 --- a/Library/Homebrew/rubocops/components_order_cop.rb +++ b/Library/Homebrew/rubocops/components_order_cop.rb @@ -2,12 +2,12 @@ require_relative "./extend/formula_cop" module RuboCop module Cop - module Homebrew + module FormulaAuditStrict # This cop checks for correct order of components in a Formula # # - component_precedence_list has component hierarchy in a nested list # where each sub array contains components' details which are at same precedence level - class FormulaComponentsOrder < FormulaCop + class ComponentsOrder < FormulaCop def audit_formula(_node, _class_node, _parent_class_node, formula_class_body_node) component_precedence_list = [ [{ name: :include, type: :method_call }], diff --git a/Library/Homebrew/rubocops/components_redundancy_cop.rb b/Library/Homebrew/rubocops/components_redundancy_cop.rb index 3d95d6c05..52dba4718 100644 --- a/Library/Homebrew/rubocops/components_redundancy_cop.rb +++ b/Library/Homebrew/rubocops/components_redundancy_cop.rb @@ -2,7 +2,7 @@ require_relative "./extend/formula_cop" module RuboCop module Cop - module Homebrew + module FormulaAuditStrict # This cop checks if redundant components are present and other component errors # # - `url|checksum|mirror` should be inside `stable` block diff --git a/Library/Homebrew/rubocops/formula_desc_cop.rb b/Library/Homebrew/rubocops/formula_desc_cop.rb index d72fa53cc..1fbf1ddbf 100644 --- a/Library/Homebrew/rubocops/formula_desc_cop.rb +++ b/Library/Homebrew/rubocops/formula_desc_cop.rb @@ -11,7 +11,7 @@ module RuboCop # - Checks if `desc` begins with an article # - Checks for correct usage of `command-line` in `desc` # - Checks if `desc` contains the formula name - class FormulaDesc < FormulaCop + class Desc < FormulaCop def audit_formula(_node, _class_node, _parent_class_node, body) desc_call = find_node_method_by_name(body, :desc) -- cgit v1.2.3