Fix reek problems or whitelist

This commit is contained in:
Markus Schirp 2013-08-05 00:13:16 +02:00
parent f3e1a76914
commit 5170a00a85
2 changed files with 10 additions and 3 deletions

View file

@ -25,11 +25,13 @@ FeatureEnvy:
enabled: true enabled: true
exclude: exclude:
- Mutant::CLI#parse - Mutant::CLI#parse
- Mutant::CLI#add_strategies
- Mutant::Matcher::Method::Instance#match? - Mutant::Matcher::Method::Instance#match?
- Mutant::Matcher::Method::Singleton#receiver? - Mutant::Matcher::Method::Singleton#receiver?
- Mutant::Mutation::Evil#success? - Mutant::Mutation::Evil#success?
- Mutant::Mutation::Neutral#success? - Mutant::Mutation::Neutral#success?
- Mutant::Reporter::CLI#subject_results - Mutant::Reporter::CLI#subject_results
- Mutant::Strategy::Rspec#options
IrresponsibleModule: IrresponsibleModule:
enabled: true enabled: true
exclude: [] exclude: []
@ -78,6 +80,8 @@ TooManyStatements:
exclude: exclude:
- Mutant#self.singleton_subclass_instance - Mutant#self.singleton_subclass_instance
- Mutant::CLI#parse - Mutant::CLI#parse
- Mutant::CLI#add_options
- Mutant::CLI#add_strategies
- Mutant::Killer::Rspec#run - Mutant::Killer::Rspec#run
- Mutant::Reporter::CLI#colorized_diff - Mutant::Reporter::CLI#colorized_diff
- Mutant::Reporter::CLI::Printer::Config::Runner#run - Mutant::Reporter::CLI::Printer::Config::Runner#run
@ -127,4 +131,8 @@ UtilityFunction:
- Mutant::Mutation::Evil#success? - Mutant::Mutation::Evil#success?
- Mutant::Mutation::Neutral#success? - Mutant::Mutation::Neutral#success?
- Mutant::NodeHelpers#s - Mutant::NodeHelpers#s
- Mutant::Strategy::Rspec#configuration
- Mutant::Strategy::Rspec#options
- Mutant::Strategy::Rspec#world
max_helper_calls: 0 max_helper_calls: 0

View file

@ -96,9 +96,8 @@ module Mutant
# @api private # @api private
# #
def match_prefixes def match_prefixes
names = name_nesting name_nesting.length.downto(1).map do |last|
names.length.downto(1).map do |last| name_nesting[0...last].join('::')
names[0...last].join('::')
end end
end end
memoize :match_prefixes memoize :match_prefixes