reek 3.5.0 → 3.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +6 -0
- data/CHANGELOG.md +19 -12
- data/CONTRIBUTING.md +7 -7
- data/README.md +91 -28
- data/ataru_setup.rb +13 -0
- data/{config/defaults.reek → defaults.reek} +0 -0
- data/docs/API.md +32 -31
- data/docs/Attribute.md +1 -1
- data/docs/Basic-Smell-Options.md +2 -1
- data/docs/Boolean-Parameter.md +1 -1
- data/docs/Class-Variable.md +2 -2
- data/docs/Command-Line-Options.md +2 -2
- data/docs/Control-Couple.md +3 -3
- data/docs/Control-Parameter.md +2 -2
- data/docs/Data-Clump.md +2 -2
- data/docs/Duplicate-Method-Call.md +4 -4
- data/docs/Feature-Envy.md +2 -2
- data/docs/How-reek-works-internally.md +2 -2
- data/docs/Irresponsible-Module.md +2 -2
- data/docs/Large-Class.md +2 -2
- data/docs/Long-Parameter-List.md +1 -1
- data/docs/Long-Yield-List.md +2 -2
- data/docs/Module-Initialize.md +3 -3
- data/docs/Nested-Iterators.md +1 -1
- data/docs/Nil-Check.md +2 -2
- data/docs/Prima-Donna-Method.md +4 -4
- data/docs/RSpec-matchers.md +7 -7
- data/docs/Rake-Task.md +2 -2
- data/docs/Reek-Driven-Development.md +4 -4
- data/docs/Repeated-Conditional.md +2 -2
- data/docs/Simulated-Polymorphism.md +2 -2
- data/docs/Smell-Suppression.md +3 -3
- data/docs/Too-Many-Instance-Variables.md +4 -4
- data/docs/Too-Many-Methods.md +5 -5
- data/docs/Too-Many-Statements.md +2 -2
- data/docs/Uncommunicative-Method-Name.md +4 -4
- data/docs/Uncommunicative-Module-Name.md +4 -4
- data/docs/Uncommunicative-Name.md +2 -2
- data/docs/Uncommunicative-Parameter-Name.md +4 -4
- data/docs/Uncommunicative-Variable-Name.md +3 -3
- data/docs/Unused-Parameters.md +2 -2
- data/docs/Utility-Function.md +4 -4
- data/docs/Versioning-Policy.md +2 -2
- data/features/command_line_interface/options.feature +1 -1
- data/features/configuration_files/directory_specific_directives.feature +4 -4
- data/features/configuration_loading.feature +10 -24
- data/features/programmatic_access.feature +3 -3
- data/features/reports/json.feature +1 -1
- data/features/reports/reports.feature +2 -2
- data/features/reports/yaml.feature +1 -1
- data/lib/reek/ast/sexp_extensions.rb +17 -498
- data/lib/reek/ast/sexp_extensions/arguments.rb +101 -0
- data/lib/reek/ast/sexp_extensions/attribute_assignments.rb +12 -0
- data/lib/reek/ast/sexp_extensions/block.rb +36 -0
- data/lib/reek/ast/sexp_extensions/case.rb +20 -0
- data/lib/reek/ast/sexp_extensions/constant.rb +12 -0
- data/lib/reek/ast/sexp_extensions/if.rb +16 -0
- data/lib/reek/ast/sexp_extensions/literal.rb +12 -0
- data/lib/reek/ast/sexp_extensions/logical_operators.rb +26 -0
- data/lib/reek/ast/sexp_extensions/methods.rb +114 -0
- data/lib/reek/ast/sexp_extensions/module.rb +85 -0
- data/lib/reek/ast/sexp_extensions/nested_assignables.rb +23 -0
- data/lib/reek/ast/sexp_extensions/send.rb +60 -0
- data/lib/reek/ast/sexp_extensions/super.rb +14 -0
- data/lib/reek/ast/sexp_extensions/symbols.rb +16 -0
- data/lib/reek/ast/sexp_extensions/variables.rb +38 -0
- data/lib/reek/ast/sexp_extensions/when.rb +16 -0
- data/lib/reek/ast/sexp_extensions/yield.rb +16 -0
- data/lib/reek/cli/application.rb +0 -4
- data/lib/reek/cli/options.rb +2 -4
- data/lib/reek/configuration/app_configuration.rb +37 -9
- data/lib/reek/configuration/configuration_file_finder.rb +8 -5
- data/lib/reek/configuration/directory_directives.rb +2 -2
- data/lib/reek/context/attribute_context.rb +21 -0
- data/lib/reek/context/code_context.rb +5 -9
- data/lib/reek/rake/task.rb +5 -5
- data/lib/reek/smells/nested_iterators.rb +73 -26
- data/lib/reek/smells/smell_warning.rb +1 -38
- data/lib/reek/source/source_code.rb +1 -1
- data/lib/reek/spec.rb +2 -2
- data/lib/reek/spec/should_reek_of.rb +8 -3
- data/lib/reek/spec/should_reek_only_of.rb +2 -1
- data/lib/reek/spec/smell_matcher.rb +59 -0
- data/lib/reek/tree_walker.rb +4 -3
- data/lib/reek/version.rb +1 -1
- data/logo/reek.bw.png +0 -0
- data/logo/reek.bw.svg +77 -0
- data/logo/reek.png +0 -0
- data/logo/reek.svg +621 -0
- data/logo/reek.text.png +0 -0
- data/logo/reek.text.svg +628 -0
- data/reek.gemspec +1 -1
- data/spec/factories/factories.rb +0 -1
- data/spec/reek/ast/sexp_extensions_spec.rb +0 -7
- data/spec/reek/cli/options_spec.rb +1 -2
- data/spec/reek/configuration/app_configuration_spec.rb +30 -14
- data/spec/reek/configuration/configuration_file_finder_spec.rb +23 -5
- data/spec/reek/smells/attribute_spec.rb +11 -2
- data/spec/reek/smells/boolean_parameter_spec.rb +14 -12
- data/spec/reek/smells/class_variable_spec.rb +18 -15
- data/spec/reek/smells/control_parameter_spec.rb +1 -2
- data/spec/reek/smells/duplicate_method_call_spec.rb +1 -2
- data/spec/reek/smells/feature_envy_spec.rb +8 -29
- data/spec/reek/smells/irresponsible_module_spec.rb +1 -2
- data/spec/reek/smells/long_parameter_list_spec.rb +1 -2
- data/spec/reek/smells/long_yield_list_spec.rb +1 -2
- data/spec/reek/smells/nested_iterators_spec.rb +1 -2
- data/spec/reek/smells/nil_check_spec.rb +1 -1
- data/spec/reek/smells/prima_donna_method_spec.rb +1 -1
- data/spec/reek/smells/repeated_conditional_spec.rb +1 -2
- data/spec/reek/smells/smell_detector_shared.rb +1 -1
- data/spec/reek/smells/smell_warning_spec.rb +2 -4
- data/spec/reek/smells/too_many_instance_variables_spec.rb +20 -19
- data/spec/reek/smells/too_many_statements_spec.rb +1 -1
- data/spec/reek/smells/uncommunicative_method_name_spec.rb +1 -4
- data/spec/reek/smells/uncommunicative_module_name_spec.rb +1 -4
- data/spec/reek/smells/uncommunicative_parameter_name_spec.rb +1 -4
- data/spec/reek/smells/uncommunicative_variable_name_spec.rb +3 -3
- data/spec/reek/smells/utility_function_spec.rb +1 -3
- data/spec/reek/spec/should_reek_of_spec.rb +5 -5
- data/spec/reek/spec/smell_matcher_spec.rb +92 -0
- data/tasks/configuration.rake +15 -0
- metadata +37 -5
- data/config/cucumber.yml +0 -3
- data/tasks/develop.rake +0 -21
@@ -3,10 +3,7 @@ require_lib 'reek/smells/too_many_instance_variables'
|
|
3
3
|
require_relative 'smell_detector_shared'
|
4
4
|
|
5
5
|
RSpec.describe Reek::Smells::TooManyInstanceVariables do
|
6
|
-
let(:
|
7
|
-
let(:detector) do
|
8
|
-
build(:smell_detector, smell_type: :TooManyInstanceVariables, source: source_name)
|
9
|
-
end
|
6
|
+
let(:detector) { build(:smell_detector, smell_type: :TooManyInstanceVariables) }
|
10
7
|
|
11
8
|
it_should_behave_like 'SmellDetector'
|
12
9
|
|
@@ -77,21 +74,25 @@ RSpec.describe Reek::Smells::TooManyInstanceVariables do
|
|
77
74
|
end
|
78
75
|
end
|
79
76
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
77
|
+
context 'when a smell is reported' do
|
78
|
+
let(:warning) do
|
79
|
+
src = <<-EOS
|
80
|
+
# Comment
|
81
|
+
class Empty
|
82
|
+
def ivars
|
83
|
+
#{ivar_sequence(count: too_many_ivars)}
|
84
|
+
end
|
86
85
|
end
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
86
|
+
EOS
|
87
|
+
ctx = Reek::Context::CodeContext.new(nil, Reek::Source::SourceCode.from(src).syntax_tree)
|
88
|
+
detector.examine_context(ctx).first
|
89
|
+
end
|
90
|
+
|
91
|
+
it_should_behave_like 'common fields set correctly'
|
92
|
+
|
93
|
+
it 'reports the correct values' do
|
94
|
+
expect(warning.parameters[:count]).to eq(too_many_ivars)
|
95
|
+
expect(warning.lines).to eq([2])
|
96
|
+
end
|
96
97
|
end
|
97
98
|
end
|
@@ -41,7 +41,7 @@ RSpec.describe Reek::Smells::TooManyStatements do
|
|
41
41
|
end
|
42
42
|
|
43
43
|
RSpec.describe Reek::Smells::TooManyStatements do
|
44
|
-
let(:detector) { build(:smell_detector, smell_type: :TooManyStatements
|
44
|
+
let(:detector) { build(:smell_detector, smell_type: :TooManyStatements) }
|
45
45
|
|
46
46
|
it_should_behave_like 'SmellDetector'
|
47
47
|
|
@@ -3,10 +3,7 @@ require_lib 'reek/smells/uncommunicative_method_name'
|
|
3
3
|
require_relative 'smell_detector_shared'
|
4
4
|
|
5
5
|
RSpec.describe Reek::Smells::UncommunicativeMethodName do
|
6
|
-
let(:
|
7
|
-
let(:detector) do
|
8
|
-
build(:smell_detector, smell_type: :UncommunicativeMethodName, source: source_name)
|
9
|
-
end
|
6
|
+
let(:detector) { build(:smell_detector, smell_type: :UncommunicativeMethodName) }
|
10
7
|
|
11
8
|
it_should_behave_like 'SmellDetector'
|
12
9
|
|
@@ -4,10 +4,7 @@ require_relative 'smell_detector_shared'
|
|
4
4
|
require_lib 'reek/context/code_context'
|
5
5
|
|
6
6
|
RSpec.describe Reek::Smells::UncommunicativeModuleName do
|
7
|
-
let(:
|
8
|
-
let(:detector) do
|
9
|
-
build(:smell_detector, smell_type: :UncommunicativeModuleName, source: source_name)
|
10
|
-
end
|
7
|
+
let(:detector) { build(:smell_detector, smell_type: :UncommunicativeModuleName) }
|
11
8
|
|
12
9
|
it_should_behave_like 'SmellDetector'
|
13
10
|
|
@@ -4,10 +4,7 @@ require_relative 'smell_detector_shared'
|
|
4
4
|
require_lib 'reek/context/method_context'
|
5
5
|
|
6
6
|
RSpec.describe Reek::Smells::UncommunicativeParameterName do
|
7
|
-
let(:detector)
|
8
|
-
build(:smell_detector, smell_type: :UncommunicativeParameterName, source: source_name)
|
9
|
-
end
|
10
|
-
let(:source_name) { 'string' }
|
7
|
+
let(:detector) { build(:smell_detector, smell_type: :UncommunicativeParameterName) }
|
11
8
|
|
12
9
|
it_should_behave_like 'SmellDetector'
|
13
10
|
|
@@ -3,9 +3,8 @@ require_lib 'reek/smells/uncommunicative_variable_name'
|
|
3
3
|
require_relative 'smell_detector_shared'
|
4
4
|
|
5
5
|
RSpec.describe Reek::Smells::UncommunicativeVariableName do
|
6
|
-
let(:source_name) { 'string' }
|
7
6
|
let(:detector) do
|
8
|
-
build(:smell_detector, smell_type: :UncommunicativeVariableName
|
7
|
+
build(:smell_detector, smell_type: :UncommunicativeVariableName)
|
9
8
|
end
|
10
9
|
|
11
10
|
it_should_behave_like 'SmellDetector'
|
@@ -65,7 +64,8 @@ RSpec.describe Reek::Smells::UncommunicativeVariableName do
|
|
65
64
|
end
|
66
65
|
|
67
66
|
it 'reports variable name outside any method' do
|
68
|
-
expect('class Simple; x = jim(45); end').to reek_of(:UncommunicativeVariableName,
|
67
|
+
expect('class Simple; x = jim(45); end').to reek_of(:UncommunicativeVariableName,
|
68
|
+
name: 'x')
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
@@ -3,11 +3,9 @@ require_lib 'reek/smells/utility_function'
|
|
3
3
|
require_lib 'reek/examiner'
|
4
4
|
require_relative 'smell_detector_shared'
|
5
5
|
|
6
|
-
# TODO: Bring specs in line with specs for other detectors
|
7
6
|
RSpec.describe Reek::Smells::UtilityFunction do
|
8
7
|
describe 'a detector' do
|
9
|
-
let(:detector) { build(:smell_detector, smell_type: :UtilityFunction
|
10
|
-
let(:source_name) { 'string' }
|
8
|
+
let(:detector) { build(:smell_detector, smell_type: :UtilityFunction) }
|
11
9
|
|
12
10
|
it_should_behave_like 'SmellDetector'
|
13
11
|
|
@@ -4,14 +4,14 @@ require_lib 'reek/spec'
|
|
4
4
|
|
5
5
|
RSpec.describe Reek::Spec::ShouldReekOf do
|
6
6
|
describe 'smell type check' do
|
7
|
-
let(:
|
7
|
+
let(:ruby) { 'def double_thing() @other.thing.foo + @other.thing.foo end' }
|
8
8
|
|
9
9
|
it 'reports duplicate calls' do
|
10
|
-
expect(
|
10
|
+
expect(ruby).to reek_of(:Duplication)
|
11
11
|
end
|
12
12
|
|
13
|
-
it 'does not report any
|
14
|
-
expect(
|
13
|
+
it 'does not report any feature envy' do
|
14
|
+
expect(ruby).not_to reek_of(:FeatureEnvy)
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
@@ -66,6 +66,7 @@ RSpec.describe Reek::Spec::ShouldReekOf do
|
|
66
66
|
|
67
67
|
context 'no smell_type is matching' do
|
68
68
|
let(:smelly_code) { 'def dummy() y = 4; end' }
|
69
|
+
|
69
70
|
let(:falsey_matcher) { Reek::Spec::ShouldReekOf.new(:FeatureEnvy, name: 'y') }
|
70
71
|
let(:truthy_matcher) { Reek::Spec::ShouldReekOf.new(:UncommunicativeVariableName, name: 'y') }
|
71
72
|
|
@@ -98,7 +99,6 @@ RSpec.describe Reek::Spec::ShouldReekOf do
|
|
98
99
|
|
99
100
|
it 'sets the proper error message' do
|
100
101
|
matcher.matches?(smelly_code)
|
101
|
-
|
102
102
|
expect(matcher.failure_message).to\
|
103
103
|
match('Expected string to reek of UncommunicativeVariableName (which it did) with '\
|
104
104
|
'smell details {:name=>"x"}, which it didn\'t')
|
@@ -0,0 +1,92 @@
|
|
1
|
+
require_relative '../../spec_helper'
|
2
|
+
require_lib 'reek/spec/smell_matcher'
|
3
|
+
|
4
|
+
RSpec.describe Reek::Spec::SmellMatcher do
|
5
|
+
let(:detector) { build(:smell_detector, smell_type: 'UncommunicativeVariableName') }
|
6
|
+
let(:smell_warning) do
|
7
|
+
build(:smell_warning, smell_detector: detector,
|
8
|
+
message: "has the variable name '@s'",
|
9
|
+
parameters: { test: 'something' })
|
10
|
+
end
|
11
|
+
let(:matcher) { described_class.new(smell_warning) }
|
12
|
+
|
13
|
+
context '#matches?' do
|
14
|
+
it 'matches on class symbol' do
|
15
|
+
expect(matcher.matches?(:UncommunicativeVariableName)).to be_truthy
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'matches on class symbol and params' do
|
19
|
+
expect(matcher.matches?(:UncommunicativeVariableName,
|
20
|
+
test: 'something')).to be_truthy
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'matches on class symbol, params and attributes' do
|
24
|
+
expect(matcher.matches?(:UncommunicativeVariableName,
|
25
|
+
test: 'something',
|
26
|
+
message: "has the variable name '@s'")).to be_truthy
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'does not match on different class symbol' do
|
30
|
+
expect(matcher.matches?(:FeatureEnvy)).to be_falsy
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'does not match on different params' do
|
34
|
+
expect(matcher.matches?(:UncommunicativeVariableName,
|
35
|
+
test: 'something else')).to be_falsy
|
36
|
+
end
|
37
|
+
|
38
|
+
it 'does not match on different attributes' do
|
39
|
+
expect(matcher.matches?(:UncommunicativeVariableName,
|
40
|
+
test: 'something',
|
41
|
+
message: 'nothing')).to be_falsy
|
42
|
+
end
|
43
|
+
|
44
|
+
it 'raises error on uncomparable attribute' do
|
45
|
+
expect do
|
46
|
+
matcher.matches?(:UncommunicativeVariableName,
|
47
|
+
test: 'something',
|
48
|
+
random: 'nothing')
|
49
|
+
end.to raise_error("The attribute 'random' is not available for comparison")
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
context '#matches_smell_type?' do
|
54
|
+
it 'matches on class symbol' do
|
55
|
+
expect(matcher.matches_smell_type?(:UncommunicativeVariableName)).to be_truthy
|
56
|
+
end
|
57
|
+
|
58
|
+
it 'matches on category symbol' do
|
59
|
+
expect(matcher.matches_smell_type?(:UncommunicativeName)).to be_truthy
|
60
|
+
end
|
61
|
+
|
62
|
+
it 'does not match on different class symbol' do
|
63
|
+
expect(matcher.matches_smell_type?(:FeatureEnvy)).to be_falsy
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
context '#matches_attributes?' do
|
68
|
+
it 'matches on params' do
|
69
|
+
expect(matcher.matches_attributes?(test: 'something')).to be_truthy
|
70
|
+
end
|
71
|
+
|
72
|
+
it 'matches on class symbol, params and attributes' do
|
73
|
+
expect(matcher.matches_attributes?(test: 'something',
|
74
|
+
message: "has the variable name '@s'")).to be_truthy
|
75
|
+
end
|
76
|
+
|
77
|
+
it 'does not match on different params' do
|
78
|
+
expect(matcher.matches_attributes?(test: 'something else')).to be_falsy
|
79
|
+
end
|
80
|
+
|
81
|
+
it 'does not match on different attributes' do
|
82
|
+
expect(matcher.matches_attributes?(test: 'something',
|
83
|
+
message: 'nothing')).to be_falsy
|
84
|
+
end
|
85
|
+
|
86
|
+
it 'raises error on uncomparable attribute' do
|
87
|
+
expect do
|
88
|
+
matcher.matches_attributes? test: 'something', random: 'nothing'
|
89
|
+
end.to raise_error("The attribute 'random' is not available for comparison")
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require_relative '../lib/reek/smells/smell_repository'
|
2
|
+
require 'yaml'
|
3
|
+
|
4
|
+
namespace :configuration do
|
5
|
+
desc 'Updates the default configuration file when smell defaults change'
|
6
|
+
task :update_default_configuration do
|
7
|
+
DEFAULT_SMELL_CONFIGURATION = 'defaults.reek'
|
8
|
+
content = Reek::Smells::SmellRepository.smell_types.each_with_object({}) do |klass, hash|
|
9
|
+
hash[klass.smell_type] = klass.default_config
|
10
|
+
end
|
11
|
+
File.open(DEFAULT_SMELL_CONFIGURATION, 'w') { |file| YAML.dump(content, file) }
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
task 'test:spec' => 'configuration:update_default_configuration'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reek
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Rutherford
|
@@ -11,13 +11,16 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2015-
|
14
|
+
date: 2015-10-30 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: parser
|
18
18
|
requirement: !ruby/object:Gem::Requirement
|
19
19
|
requirements:
|
20
20
|
- - "~>"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '2.2'
|
23
|
+
- - ">="
|
21
24
|
- !ruby/object:Gem::Version
|
22
25
|
version: 2.2.2.5
|
23
26
|
type: :runtime
|
@@ -25,6 +28,9 @@ dependencies:
|
|
25
28
|
version_requirements: !ruby/object:Gem::Requirement
|
26
29
|
requirements:
|
27
30
|
- - "~>"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '2.2'
|
33
|
+
- - ">="
|
28
34
|
- !ruby/object:Gem::Version
|
29
35
|
version: 2.2.2.5
|
30
36
|
- !ruby/object:Gem::Dependency
|
@@ -217,9 +223,9 @@ files:
|
|
217
223
|
- License.txt
|
218
224
|
- README.md
|
219
225
|
- Rakefile
|
226
|
+
- ataru_setup.rb
|
220
227
|
- bin/reek
|
221
|
-
-
|
222
|
-
- config/defaults.reek
|
228
|
+
- defaults.reek
|
223
229
|
- docs/API.md
|
224
230
|
- docs/Attribute.md
|
225
231
|
- docs/Basic-Smell-Options.md
|
@@ -288,6 +294,23 @@ files:
|
|
288
294
|
- lib/reek/ast/object_refs.rb
|
289
295
|
- lib/reek/ast/reference_collector.rb
|
290
296
|
- lib/reek/ast/sexp_extensions.rb
|
297
|
+
- lib/reek/ast/sexp_extensions/arguments.rb
|
298
|
+
- lib/reek/ast/sexp_extensions/attribute_assignments.rb
|
299
|
+
- lib/reek/ast/sexp_extensions/block.rb
|
300
|
+
- lib/reek/ast/sexp_extensions/case.rb
|
301
|
+
- lib/reek/ast/sexp_extensions/constant.rb
|
302
|
+
- lib/reek/ast/sexp_extensions/if.rb
|
303
|
+
- lib/reek/ast/sexp_extensions/literal.rb
|
304
|
+
- lib/reek/ast/sexp_extensions/logical_operators.rb
|
305
|
+
- lib/reek/ast/sexp_extensions/methods.rb
|
306
|
+
- lib/reek/ast/sexp_extensions/module.rb
|
307
|
+
- lib/reek/ast/sexp_extensions/nested_assignables.rb
|
308
|
+
- lib/reek/ast/sexp_extensions/send.rb
|
309
|
+
- lib/reek/ast/sexp_extensions/super.rb
|
310
|
+
- lib/reek/ast/sexp_extensions/symbols.rb
|
311
|
+
- lib/reek/ast/sexp_extensions/variables.rb
|
312
|
+
- lib/reek/ast/sexp_extensions/when.rb
|
313
|
+
- lib/reek/ast/sexp_extensions/yield.rb
|
291
314
|
- lib/reek/ast/sexp_formatter.rb
|
292
315
|
- lib/reek/cli/application.rb
|
293
316
|
- lib/reek/cli/command.rb
|
@@ -304,6 +327,7 @@ files:
|
|
304
327
|
- lib/reek/configuration/default_directive.rb
|
305
328
|
- lib/reek/configuration/directory_directives.rb
|
306
329
|
- lib/reek/configuration/excluded_paths.rb
|
330
|
+
- lib/reek/context/attribute_context.rb
|
307
331
|
- lib/reek/context/code_context.rb
|
308
332
|
- lib/reek/context/method_context.rb
|
309
333
|
- lib/reek/context/module_context.rb
|
@@ -352,9 +376,16 @@ files:
|
|
352
376
|
- lib/reek/spec/should_reek.rb
|
353
377
|
- lib/reek/spec/should_reek_of.rb
|
354
378
|
- lib/reek/spec/should_reek_only_of.rb
|
379
|
+
- lib/reek/spec/smell_matcher.rb
|
355
380
|
- lib/reek/tree_dresser.rb
|
356
381
|
- lib/reek/tree_walker.rb
|
357
382
|
- lib/reek/version.rb
|
383
|
+
- logo/reek.bw.png
|
384
|
+
- logo/reek.bw.svg
|
385
|
+
- logo/reek.png
|
386
|
+
- logo/reek.svg
|
387
|
+
- logo/reek.text.png
|
388
|
+
- logo/reek.text.svg
|
358
389
|
- reek.gemspec
|
359
390
|
- spec/factories/factories.rb
|
360
391
|
- spec/quality/reek_source_spec.rb
|
@@ -417,6 +448,7 @@ files:
|
|
417
448
|
- spec/reek/spec/should_reek_of_spec.rb
|
418
449
|
- spec/reek/spec/should_reek_only_of_spec.rb
|
419
450
|
- spec/reek/spec/should_reek_spec.rb
|
451
|
+
- spec/reek/spec/smell_matcher_spec.rb
|
420
452
|
- spec/reek/tree_dresser_spec.rb
|
421
453
|
- spec/reek/tree_walker_spec.rb
|
422
454
|
- spec/samples/all_but_one_masked/clean_one.rb
|
@@ -453,7 +485,7 @@ files:
|
|
453
485
|
- spec/samples/two_smelly_files/dirty_one.rb
|
454
486
|
- spec/samples/two_smelly_files/dirty_two.rb
|
455
487
|
- spec/spec_helper.rb
|
456
|
-
- tasks/
|
488
|
+
- tasks/configuration.rake
|
457
489
|
- tasks/reek.rake
|
458
490
|
- tasks/rubocop.rake
|
459
491
|
- tasks/test.rake
|
data/config/cucumber.yml
DELETED
data/tasks/develop.rake
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
require 'rake/clean'
|
2
|
-
require_relative '../lib/reek/smells/smell_repository'
|
3
|
-
|
4
|
-
CONFIG_FILE = 'config/defaults.reek'
|
5
|
-
|
6
|
-
file CONFIG_FILE do
|
7
|
-
config = {}
|
8
|
-
Reek::Smells::SmellRepository.smell_types.each do |klass|
|
9
|
-
config[klass.name.split(/::/)[-1]] = klass.default_config
|
10
|
-
end
|
11
|
-
$stderr.puts "Creating #{CONFIG_FILE}"
|
12
|
-
require 'yaml'
|
13
|
-
File.open(CONFIG_FILE, 'w') { |f| YAML.dump(config, f) }
|
14
|
-
end
|
15
|
-
|
16
|
-
task CONFIG_FILE => FileList['lib/reek/smells/*.rb']
|
17
|
-
|
18
|
-
task 'test:spec' => CONFIG_FILE
|
19
|
-
task 'test:quality' => CONFIG_FILE
|
20
|
-
task 'test:features' => CONFIG_FILE
|
21
|
-
task 'reek' => CONFIG_FILE
|