Merge pull request #617 from mbj/fix/new-critic-offenses
Fix RuboCop and Reek violations
This commit is contained in:
commit
d07daec9d8
9 changed files with 15 additions and 21 deletions
|
@ -1,6 +1,8 @@
|
|||
module Mutant
|
||||
module AST
|
||||
# Singleton nodes
|
||||
#
|
||||
# :reek:TooManyConstants
|
||||
module Nodes
|
||||
extend Sexp
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
module Mutant
|
||||
module AST
|
||||
# Groups of node types
|
||||
#
|
||||
# :reek:TooManyConstants
|
||||
module Types
|
||||
symbolset = ->(strings) { strings.map(&:to_sym).to_set.freeze }
|
||||
|
||||
|
|
|
@ -17,6 +17,8 @@ module Mutant
|
|||
# * location
|
||||
# Is NOT enough. It would not be unique. So we add an "example index"
|
||||
# for unique reference.
|
||||
#
|
||||
# :reek:TooManyConstants
|
||||
class Rspec < self
|
||||
|
||||
ALL_EXPRESSION = Expression::Namespace::Recursive.new(scope_name: nil)
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
module Mutant
|
||||
class Matcher
|
||||
# Subject matcher configuration
|
||||
#
|
||||
# :reek:TooManyConstants
|
||||
class Config
|
||||
include Adamantium, Anima.new(
|
||||
:ignore_expressions,
|
||||
|
|
|
@ -54,8 +54,6 @@ module Mutant
|
|||
# @param [Fixnum] index
|
||||
#
|
||||
# @return [undefined]
|
||||
#
|
||||
# rubocop:disable RedundantBlockCall - its not redundant here
|
||||
def mutate_child(index, &block)
|
||||
block ||= TAUTOLOGY
|
||||
Mutator.mutate(children.fetch(index), self).each do |mutation|
|
||||
|
|
|
@ -3,6 +3,8 @@ module Mutant
|
|||
class CLI
|
||||
class Printer
|
||||
# Reporter for mutation results
|
||||
#
|
||||
# :reek:TooManyConstants
|
||||
class MutationResult < self
|
||||
|
||||
delegate :mutation, :test_result
|
||||
|
|
|
@ -294,7 +294,6 @@ module MutantSpec
|
|||
end
|
||||
end # ErrorWhitelist
|
||||
|
||||
# rubocop:disable ClosingParenthesisIndentation
|
||||
LOADER = Morpher.build do
|
||||
s(:block,
|
||||
s(:guard, s(:primitive, Array)),
|
||||
|
@ -317,22 +316,14 @@ module MutantSpec
|
|||
[
|
||||
->(hash) { hash.map { |key, values| [key, values.map(&Pathname.method(:new))] }.to_h },
|
||||
->(hash) { hash.map { |key, values| [key, values.map(&:to_s)] }.to_h }
|
||||
]
|
||||
),
|
||||
s(:load_attribute_hash, s(:param, ErrorWhitelist))
|
||||
)
|
||||
)
|
||||
),
|
||||
]),
|
||||
s(:load_attribute_hash, s(:param, ErrorWhitelist))))),
|
||||
s(:load_attribute_hash,
|
||||
# NOTE: The domain param has no DSL currently!
|
||||
Morpher::Evaluator::Transformer::Domain::Param.new(
|
||||
Project,
|
||||
%i[repo_uri name expected_errors mutation_coverage mutation_generation]
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)))))
|
||||
end
|
||||
|
||||
ALL = LOADER.call(YAML.load_file(ROOT.join('spec', 'integrations.yml')))
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
# rubocop:disable ClosingParenthesisIndentation
|
||||
RSpec.describe Mutant::Context do
|
||||
describe '.wrap' do
|
||||
subject { described_class.wrap(scope, node) }
|
||||
|
@ -11,8 +10,7 @@ RSpec.describe Mutant::Context do
|
|||
let(:expected) do
|
||||
s(:module,
|
||||
s(:const, nil, :Mutant),
|
||||
s(:str, 'test')
|
||||
)
|
||||
s(:str, 'test'))
|
||||
end
|
||||
|
||||
it { should eql(expected) }
|
||||
|
@ -25,8 +23,7 @@ RSpec.describe Mutant::Context do
|
|||
s(:class,
|
||||
s(:const, nil, :Context),
|
||||
nil,
|
||||
s(:str, 'test')
|
||||
)
|
||||
s(:str, 'test'))
|
||||
end
|
||||
|
||||
it { should eql(expected) }
|
||||
|
|
|
@ -16,8 +16,6 @@ RSpec.describe Mutant::Matcher::Methods::Instance, '#call' do
|
|||
|
||||
private :method_d
|
||||
|
||||
public
|
||||
|
||||
def method_a
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue