rubycritic 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/lib/rubycritic/analysers/attributes.rb +21 -0
- data/lib/rubycritic/analysers/churn.rb +5 -5
- data/lib/rubycritic/analysers/complexity.rb +6 -6
- data/lib/rubycritic/analysers/helpers/ast_node.rb +73 -0
- data/lib/rubycritic/analysers/{adapters → helpers}/config.reek +0 -0
- data/lib/rubycritic/analysers/{adapters → helpers}/flay.rb +0 -0
- data/lib/rubycritic/analysers/{adapters → helpers}/flog.rb +0 -0
- data/lib/rubycritic/analysers/helpers/methods_counter.rb +28 -0
- data/lib/rubycritic/analysers/helpers/modules_locator.rb +46 -0
- data/lib/rubycritic/analysers/{adapters → helpers}/reek.rb +0 -0
- data/lib/rubycritic/analysers/smells/flay.rb +9 -9
- data/lib/rubycritic/analysers/smells/flog.rb +8 -8
- data/lib/rubycritic/analysers/smells/reek.rb +8 -8
- data/lib/rubycritic/analysers_runner.rb +6 -6
- data/lib/rubycritic/cli.rb +2 -2
- data/lib/rubycritic/core/{analysed_file.rb → analysed_module.rb} +4 -7
- data/lib/rubycritic/modules_initializer.rb +14 -0
- data/lib/rubycritic/orchestrator.rb +5 -5
- data/lib/rubycritic/report_generators/code_file.rb +4 -4
- data/lib/rubycritic/report_generators/code_index.rb +2 -2
- data/lib/rubycritic/report_generators/overview.rb +2 -2
- data/lib/rubycritic/report_generators/smells_index.rb +13 -2
- data/lib/rubycritic/report_generators/templates/code_file.html.erb +10 -10
- data/lib/rubycritic/report_generators/templates/code_index.html.erb +7 -7
- data/lib/rubycritic/report_generators/templates/smells_index.html.erb +1 -1
- data/lib/rubycritic/report_generators/turbulence.rb +5 -5
- data/lib/rubycritic/report_generators/view_helpers.rb +4 -4
- data/lib/rubycritic/reporters/main.rb +7 -8
- data/lib/rubycritic/reporters/mini.rb +3 -3
- data/lib/rubycritic/revision_comparator.rb +12 -10
- data/lib/rubycritic/source_locator.rb +1 -1
- data/lib/rubycritic/version.rb +1 -1
- data/rubycritic.gemspec +3 -4
- data/test/analysers_test_helper.rb +1 -1
- data/test/lib/rubycritic/analysers/churn_test.rb +9 -9
- data/test/lib/rubycritic/analysers/complexity_test.rb +5 -5
- data/test/lib/rubycritic/analysers/helpers/methods_counter_test.rb +29 -0
- data/test/lib/rubycritic/analysers/helpers/modules_locator_test.rb +53 -0
- data/test/lib/rubycritic/analysers/smells/flay_test.rb +10 -12
- data/test/lib/rubycritic/analysers/smells/flog_test.rb +7 -7
- data/test/lib/rubycritic/analysers/smells/reek_test.rb +10 -10
- data/test/lib/rubycritic/core/analysed_module_test.rb +88 -0
- data/test/lib/rubycritic/report_generators/turbulence_test.rb +4 -4
- data/test/lib/rubycritic/report_generators/view_helpers_test.rb +10 -23
- data/test/lib/rubycritic/smells_status_setter_test.rb +1 -1
- data/test/lib/rubycritic/source_locator_test.rb +6 -6
- data/test/samples/{stats/empty_example.rb → empty.rb} +0 -0
- data/test/samples/{stats/example.rb → methods_count.rb} +0 -0
- data/test/samples/module_names.rb +18 -0
- data/test/samples/unparsable.rb +1 -0
- metadata +30 -23
- data/lib/rubycritic/analysers/adapters/ast_node.rb +0 -35
- data/lib/rubycritic/analysers/stats.rb +0 -34
- data/lib/rubycritic/files_initializer.rb +0 -15
- data/test/lib/rubycritic/analysers/stats_test.rb +0 -30
- data/test/lib/rubycritic/core/analysed_file_test.rb +0 -86
- data/test/samples/stats/unparsable_example.rb +0 -2
@@ -0,0 +1,53 @@
|
|
1
|
+
require "test_helper"
|
2
|
+
require "rubycritic/analysers/helpers/modules_locator"
|
3
|
+
require "rubycritic/core/analysed_module"
|
4
|
+
require "pathname"
|
5
|
+
|
6
|
+
describe Rubycritic::ModulesLocator do
|
7
|
+
describe "#names" do
|
8
|
+
context "when a file contains Ruby code" do
|
9
|
+
it "returns the names of all the classes and modules inside the file" do
|
10
|
+
analysed_module = Rubycritic::AnalysedModule.new(
|
11
|
+
:pathname => Pathname.new("test/samples/module_names.rb"),
|
12
|
+
:methods_count => 1
|
13
|
+
)
|
14
|
+
Rubycritic::ModulesLocator.new(analysed_module).names
|
15
|
+
.must_equal ["Foo", "Foo::Bar", "Foo::Baz", "Foo::Qux", "Foo::Quux::Corge"]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
context "when a file is empty" do
|
20
|
+
it "returns the name of the file titleized" do
|
21
|
+
analysed_module = Rubycritic::AnalysedModule.new(
|
22
|
+
:pathname => Pathname.new("test/samples/empty.rb"),
|
23
|
+
:methods_count => 1
|
24
|
+
)
|
25
|
+
Rubycritic::ModulesLocator.new(analysed_module).names.must_equal ["Empty"]
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
context "when a file is unparsable" do
|
30
|
+
it "does not blow up and returns the name of the file titleized" do
|
31
|
+
analysed_module = Rubycritic::AnalysedModule.new(
|
32
|
+
:pathname => Pathname.new("test/samples/unparsable.rb"),
|
33
|
+
:methods_count => 1
|
34
|
+
)
|
35
|
+
capture_output_streams do
|
36
|
+
Rubycritic::ModulesLocator.new(analysed_module).names.must_equal ["Unparsable"]
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
context "when a file has no methods" do
|
42
|
+
it "returns the name of the file titleized" do
|
43
|
+
analysed_module = Rubycritic::AnalysedModule.new(
|
44
|
+
:pathname => Pathname.new("test/samples/no_methods.rb"),
|
45
|
+
:methods_count => 0
|
46
|
+
)
|
47
|
+
capture_output_streams do
|
48
|
+
Rubycritic::ModulesLocator.new(analysed_module).names.must_equal ["NoMethods"]
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -1,34 +1,32 @@
|
|
1
1
|
require "test_helper"
|
2
2
|
require "rubycritic/analysers/smells/flay"
|
3
|
-
require "rubycritic/core/
|
3
|
+
require "rubycritic/core/analysed_module"
|
4
4
|
require "pathname"
|
5
5
|
|
6
6
|
describe Rubycritic::Analyser::FlaySmells do
|
7
7
|
before do
|
8
|
-
@
|
8
|
+
@analysed_module = Rubycritic::AnalysedModule.new(
|
9
9
|
:pathname => Pathname.new("test/samples/flay/smelly.rb"),
|
10
|
-
:smells => [],
|
11
|
-
:duplication => 0
|
12
10
|
)
|
13
|
-
|
14
|
-
Rubycritic::Analyser::FlaySmells.new(
|
11
|
+
analysed_modules = [@analysed_module]
|
12
|
+
Rubycritic::Analyser::FlaySmells.new(analysed_modules).run
|
15
13
|
end
|
16
14
|
|
17
|
-
it "detects smells and adds them to
|
18
|
-
@
|
15
|
+
it "detects smells and adds them to analysed_modules" do
|
16
|
+
@analysed_module.smells.length.must_equal 1
|
19
17
|
end
|
20
18
|
|
21
19
|
it "creates smells with messages" do
|
22
|
-
smell = @
|
20
|
+
smell = @analysed_module.smells.first
|
23
21
|
smell.message.must_be_instance_of String
|
24
22
|
end
|
25
23
|
|
26
24
|
it "creates smells with scores" do
|
27
|
-
smell = @
|
25
|
+
smell = @analysed_module.smells.first
|
28
26
|
smell.score.must_be_kind_of Numeric
|
29
27
|
end
|
30
28
|
|
31
|
-
it "calculates the mass of duplicate code and adds it to
|
32
|
-
@
|
29
|
+
it "calculates the mass of duplicate code and adds it to analysed_modules" do
|
30
|
+
@analysed_module.duplication.must_be(:>, 0)
|
33
31
|
end
|
34
32
|
end
|
@@ -3,22 +3,22 @@ require "rubycritic/analysers/smells/flog"
|
|
3
3
|
|
4
4
|
describe Rubycritic::Analyser::FlogSmells do
|
5
5
|
before do
|
6
|
-
@
|
7
|
-
|
8
|
-
Rubycritic::Analyser::FlogSmells.new(
|
6
|
+
@analysed_module = AnalysedModuleDouble.new(:path => "test/samples/flog/smelly.rb", :smells => [])
|
7
|
+
analysed_modules = [@analysed_module]
|
8
|
+
Rubycritic::Analyser::FlogSmells.new(analysed_modules).run
|
9
9
|
end
|
10
10
|
|
11
|
-
it "detects smells and adds them to
|
12
|
-
@
|
11
|
+
it "detects smells and adds them to analysed_modules" do
|
12
|
+
@analysed_module.smells.length.must_equal 1
|
13
13
|
end
|
14
14
|
|
15
15
|
it "creates smells with messages" do
|
16
|
-
smell = @
|
16
|
+
smell = @analysed_module.smells.first
|
17
17
|
smell.message.must_be_instance_of String
|
18
18
|
end
|
19
19
|
|
20
20
|
it "creates smells with scores" do
|
21
|
-
smell = @
|
21
|
+
smell = @analysed_module.smells.first
|
22
22
|
smell.score.must_be_kind_of Numeric
|
23
23
|
end
|
24
24
|
end
|
@@ -4,30 +4,30 @@ require "rubycritic/analysers/smells/reek"
|
|
4
4
|
describe Rubycritic::Analyser::ReekSmells do
|
5
5
|
context "when analysing a smelly file" do
|
6
6
|
before do
|
7
|
-
@
|
8
|
-
|
9
|
-
Rubycritic::Analyser::ReekSmells.new(
|
7
|
+
@analysed_module = AnalysedModuleDouble.new(:path => "test/samples/reek/smelly.rb", :smells => [])
|
8
|
+
analysed_modules = [@analysed_module]
|
9
|
+
Rubycritic::Analyser::ReekSmells.new(analysed_modules).run
|
10
10
|
end
|
11
11
|
|
12
|
-
it "detects smells and adds them to
|
13
|
-
@
|
12
|
+
it "detects smells and adds them to analysed_modules" do
|
13
|
+
@analysed_module.smells.length.must_equal 1
|
14
14
|
end
|
15
15
|
|
16
16
|
it "creates smells with messages" do
|
17
|
-
smell = @
|
17
|
+
smell = @analysed_module.smells.first
|
18
18
|
smell.message.must_equal "has boolean parameter 'reek'"
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
22
|
context "when analysing a file with smells ignored in config.reek" do
|
23
23
|
before do
|
24
|
-
@
|
25
|
-
|
26
|
-
Rubycritic::Analyser::ReekSmells.new(
|
24
|
+
@analysed_module = AnalysedModuleDouble.new(:path => "test/samples/reek/not_smelly.rb", :smells => [])
|
25
|
+
analysed_modules = [@analysed_module]
|
26
|
+
Rubycritic::Analyser::ReekSmells.new(analysed_modules).run
|
27
27
|
end
|
28
28
|
|
29
29
|
it "does not detect smells and does not add them to analysed files" do
|
30
|
-
@
|
30
|
+
@analysed_module.smells.must_be_empty
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|
@@ -0,0 +1,88 @@
|
|
1
|
+
require "test_helper"
|
2
|
+
require "rubycritic/core/analysed_module"
|
3
|
+
require "rubycritic/core/smell"
|
4
|
+
|
5
|
+
describe Rubycritic::AnalysedModule do
|
6
|
+
describe "attribute readers" do
|
7
|
+
before do
|
8
|
+
@name = "Foo"
|
9
|
+
@pathname = Pathname.new("foo.rb")
|
10
|
+
@smells = []
|
11
|
+
@churn = 1
|
12
|
+
@complexity = 2
|
13
|
+
@analysed_module = Rubycritic::AnalysedModule.new(
|
14
|
+
:name => @name,
|
15
|
+
:pathname => @pathname,
|
16
|
+
:smells => @smells,
|
17
|
+
:churn => @churn,
|
18
|
+
:complexity => @complexity
|
19
|
+
)
|
20
|
+
end
|
21
|
+
|
22
|
+
it "has a name reader" do
|
23
|
+
@analysed_module.name.must_equal @name
|
24
|
+
end
|
25
|
+
|
26
|
+
it "has a pathname reader" do
|
27
|
+
@analysed_module.pathname.must_equal @pathname
|
28
|
+
end
|
29
|
+
|
30
|
+
it "has a path reader" do
|
31
|
+
@analysed_module.path.must_equal @pathname.to_s
|
32
|
+
end
|
33
|
+
|
34
|
+
it "has a smells reader" do
|
35
|
+
@analysed_module.smells.must_equal @smells
|
36
|
+
end
|
37
|
+
|
38
|
+
it "has a churn reader" do
|
39
|
+
@analysed_module.churn.must_equal @churn
|
40
|
+
end
|
41
|
+
|
42
|
+
it "has a complexity reader" do
|
43
|
+
@analysed_module.complexity.must_equal @complexity
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
describe "#cost" do
|
48
|
+
it "returns the remediation cost of fixing the analysed_module" do
|
49
|
+
smells = [SmellDouble.new(:cost => 1), SmellDouble.new(:cost => 2)]
|
50
|
+
analysed_module = Rubycritic::AnalysedModule.new(:smells => smells, :complexity => 0)
|
51
|
+
analysed_module.cost.must_equal 3
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
describe "#complexity_per_method" do
|
56
|
+
context "when the file has no methods" do
|
57
|
+
it "returns a placeholder" do
|
58
|
+
analysed_module = Rubycritic::AnalysedModule.new(:complexity => 0, :methods_count => 0)
|
59
|
+
analysed_module.complexity_per_method.must_equal "N/A"
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
context "when the file has at least one method" do
|
64
|
+
it "returns the average complexity per method" do
|
65
|
+
analysed_module = Rubycritic::AnalysedModule.new(:complexity => 10, :methods_count => 2)
|
66
|
+
analysed_module.complexity_per_method.must_equal 5
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
describe "#has_smells?" do
|
72
|
+
it "returns true if the analysed_module has at least one smell" do
|
73
|
+
analysed_module = Rubycritic::AnalysedModule.new(:smells => [SmellDouble.new])
|
74
|
+
analysed_module.has_smells?.must_equal true
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
describe "#smells_at_location" do
|
79
|
+
it "returns the smells of an analysed_module at a certain location" do
|
80
|
+
location = Rubycritic::Location.new("./foo", "42")
|
81
|
+
smells = [Rubycritic::Smell.new(:locations => [location])]
|
82
|
+
analysed_module = Rubycritic::AnalysedModule.new(:smells => smells)
|
83
|
+
analysed_module.smells_at_location(location).must_equal smells
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
class SmellDouble < OpenStruct; end
|
@@ -2,16 +2,16 @@ require "test_helper"
|
|
2
2
|
require "rubycritic/report_generators/turbulence"
|
3
3
|
|
4
4
|
describe Rubycritic::Turbulence do
|
5
|
-
describe "
|
5
|
+
describe "::data" do
|
6
6
|
it "returns json data that maps pathname, churn and complexity to name, x and y" do
|
7
|
-
files = [
|
7
|
+
files = [AnalysedModuleDouble.new(:name => "Foo", :churn => 1, :complexity => 2)]
|
8
8
|
turbulence_data = Rubycritic::Turbulence.data(files)
|
9
9
|
instance_parsed_json = JSON.parse(turbulence_data).first
|
10
|
-
instance_parsed_json["name"].must_equal "
|
10
|
+
instance_parsed_json["name"].must_equal "Foo"
|
11
11
|
instance_parsed_json["x"].must_equal 1
|
12
12
|
instance_parsed_json["y"].must_equal 2
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
-
class
|
17
|
+
class AnalysedModuleDouble < OpenStruct; end
|
@@ -22,57 +22,44 @@ describe Rubycritic::ViewHelpers do
|
|
22
22
|
|
23
23
|
describe "#asset_path" do
|
24
24
|
it "creates a relative path to an asset" do
|
25
|
-
generator.asset_path("stylesheets
|
25
|
+
generator.asset_path("stylesheets/application.css").to_s
|
26
26
|
.must_equal "assets/stylesheets/application.css"
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
-
context "when the file is
|
32
|
-
let(:generator) { GeneratorDouble.new("
|
31
|
+
context "when the file is n directories deep" do
|
32
|
+
let(:generator) { GeneratorDouble.new("lets/go/crazy/foo.html") }
|
33
33
|
|
34
34
|
describe "#file_path" do
|
35
35
|
context "when the other file is in the same directory" do
|
36
36
|
it "creates a relative path to a file" do
|
37
|
-
generator.file_path("
|
37
|
+
generator.file_path("lets/go/crazy/bar.html").to_s.must_equal "bar.html"
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
41
|
context "when the other file is in the root directory" do
|
42
42
|
it "creates a relative path to a file" do
|
43
|
-
generator.file_path("bar.html").to_s.must_equal "
|
43
|
+
generator.file_path("bar.html").to_s.must_equal "../../../bar.html"
|
44
44
|
end
|
45
45
|
end
|
46
|
-
end
|
47
46
|
|
48
|
-
|
49
|
-
it "creates a relative path to an asset" do
|
50
|
-
generator.asset_path("stylesheets", "application.css").to_s
|
51
|
-
.must_equal "../assets/stylesheets/application.css"
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
context "when the file is n directories deep" do
|
57
|
-
let(:generator) { GeneratorDouble.new("lets/go/crazy/foo.html") }
|
58
|
-
|
59
|
-
describe "#file_path" do
|
60
|
-
context "when the other file is in the same directory" do
|
47
|
+
context "when the other file has n-1 directories in common" do
|
61
48
|
it "creates a relative path to a file" do
|
62
|
-
generator.file_path("lets/go/
|
49
|
+
generator.file_path("lets/go/home/bar.html").to_s.must_equal "../home/bar.html"
|
63
50
|
end
|
64
51
|
end
|
65
52
|
|
66
|
-
context "when the other file is
|
53
|
+
context "when the other file is one directory deeper" do
|
67
54
|
it "creates a relative path to a file" do
|
68
|
-
generator.file_path("bar.html").to_s.must_equal "
|
55
|
+
generator.file_path("lets/go/crazy/everybody/bar.html").to_s.must_equal "everybody/bar.html"
|
69
56
|
end
|
70
57
|
end
|
71
58
|
end
|
72
59
|
|
73
60
|
describe "#asset_path" do
|
74
61
|
it "creates a relative path to an asset" do
|
75
|
-
generator.asset_path("stylesheets
|
62
|
+
generator.asset_path("stylesheets/application.css").to_s
|
76
63
|
.must_equal "../../../assets/stylesheets/application.css"
|
77
64
|
end
|
78
65
|
end
|
@@ -13,21 +13,21 @@ describe Rubycritic::SourceLocator do
|
|
13
13
|
Rubycritic::SourceLocator.new(paths).paths.must_equal paths
|
14
14
|
end
|
15
15
|
|
16
|
-
it "finds files through multiple paths" do
|
17
|
-
paths = ["dir1/file1.rb", "file0.rb"]
|
18
|
-
Rubycritic::SourceLocator.new(paths).paths.must_equal paths
|
19
|
-
end
|
20
|
-
|
21
16
|
it "finds all the files inside a given directory" do
|
22
17
|
initial_paths = ["dir1"]
|
23
18
|
final_paths = ["dir1/file1.rb"]
|
24
19
|
Rubycritic::SourceLocator.new(initial_paths).paths.must_equal final_paths
|
25
20
|
end
|
26
21
|
|
22
|
+
it "finds files through multiple paths" do
|
23
|
+
paths = ["dir1/file1.rb", "file0.rb"]
|
24
|
+
Rubycritic::SourceLocator.new(paths).paths.sort.must_equal paths
|
25
|
+
end
|
26
|
+
|
27
27
|
it "finds all the files" do
|
28
28
|
initial_paths = ["."]
|
29
29
|
final_paths = ["dir1/file1.rb", "file0.rb"]
|
30
|
-
Rubycritic::SourceLocator.new(initial_paths).paths.must_equal final_paths
|
30
|
+
Rubycritic::SourceLocator.new(initial_paths).paths.sort.must_equal final_paths
|
31
31
|
end
|
32
32
|
|
33
33
|
it "cleans paths of consecutive slashes and useless dots" do
|
File without changes
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
unparsable :<%=
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubycritic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guilherme Simoes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: virtus
|
@@ -156,8 +156,8 @@ dependencies:
|
|
156
156
|
- - "~>"
|
157
157
|
- !ruby/object:Gem::Version
|
158
158
|
version: '1.0'
|
159
|
-
description:
|
160
|
-
|
159
|
+
description: RubyCritic is a tool that wraps around various static analysis gems to
|
160
|
+
provide a quality report of your Ruby code.
|
161
161
|
email:
|
162
162
|
- guilherme.rdems@gmail.com
|
163
163
|
executables:
|
@@ -167,6 +167,7 @@ extra_rdoc_files: []
|
|
167
167
|
files:
|
168
168
|
- ".gitignore"
|
169
169
|
- ".travis.yml"
|
170
|
+
- CHANGELOG.md
|
170
171
|
- CONTRIBUTING.md
|
171
172
|
- Gemfile
|
172
173
|
- LICENSE.txt
|
@@ -174,25 +175,27 @@ files:
|
|
174
175
|
- Rakefile
|
175
176
|
- bin/rubycritic
|
176
177
|
- lib/rubycritic.rb
|
177
|
-
- lib/rubycritic/analysers/
|
178
|
-
- lib/rubycritic/analysers/adapters/config.reek
|
179
|
-
- lib/rubycritic/analysers/adapters/flay.rb
|
180
|
-
- lib/rubycritic/analysers/adapters/flog.rb
|
181
|
-
- lib/rubycritic/analysers/adapters/reek.rb
|
178
|
+
- lib/rubycritic/analysers/attributes.rb
|
182
179
|
- lib/rubycritic/analysers/churn.rb
|
183
180
|
- lib/rubycritic/analysers/complexity.rb
|
181
|
+
- lib/rubycritic/analysers/helpers/ast_node.rb
|
182
|
+
- lib/rubycritic/analysers/helpers/config.reek
|
183
|
+
- lib/rubycritic/analysers/helpers/flay.rb
|
184
|
+
- lib/rubycritic/analysers/helpers/flog.rb
|
185
|
+
- lib/rubycritic/analysers/helpers/methods_counter.rb
|
186
|
+
- lib/rubycritic/analysers/helpers/modules_locator.rb
|
187
|
+
- lib/rubycritic/analysers/helpers/reek.rb
|
184
188
|
- lib/rubycritic/analysers/smells/flay.rb
|
185
189
|
- lib/rubycritic/analysers/smells/flog.rb
|
186
190
|
- lib/rubycritic/analysers/smells/reek.rb
|
187
|
-
- lib/rubycritic/analysers/stats.rb
|
188
191
|
- lib/rubycritic/analysers_runner.rb
|
189
192
|
- lib/rubycritic/cli.rb
|
190
193
|
- lib/rubycritic/configuration.rb
|
191
|
-
- lib/rubycritic/core/
|
194
|
+
- lib/rubycritic/core/analysed_module.rb
|
192
195
|
- lib/rubycritic/core/location.rb
|
193
196
|
- lib/rubycritic/core/rating.rb
|
194
197
|
- lib/rubycritic/core/smell.rb
|
195
|
-
- lib/rubycritic/
|
198
|
+
- lib/rubycritic/modules_initializer.rb
|
196
199
|
- lib/rubycritic/orchestrator.rb
|
197
200
|
- lib/rubycritic/report_generators/assets/javascripts/application.js
|
198
201
|
- lib/rubycritic/report_generators/assets/javascripts/highcharts.src-4.0.1.js
|
@@ -235,12 +238,13 @@ files:
|
|
235
238
|
- test/analysers_test_helper.rb
|
236
239
|
- test/lib/rubycritic/analysers/churn_test.rb
|
237
240
|
- test/lib/rubycritic/analysers/complexity_test.rb
|
241
|
+
- test/lib/rubycritic/analysers/helpers/methods_counter_test.rb
|
242
|
+
- test/lib/rubycritic/analysers/helpers/modules_locator_test.rb
|
238
243
|
- test/lib/rubycritic/analysers/smells/flay_test.rb
|
239
244
|
- test/lib/rubycritic/analysers/smells/flog_test.rb
|
240
245
|
- test/lib/rubycritic/analysers/smells/reek_test.rb
|
241
|
-
- test/lib/rubycritic/analysers/stats_test.rb
|
242
246
|
- test/lib/rubycritic/configuration_test.rb
|
243
|
-
- test/lib/rubycritic/core/
|
247
|
+
- test/lib/rubycritic/core/analysed_module_test.rb
|
244
248
|
- test/lib/rubycritic/core/location_test.rb
|
245
249
|
- test/lib/rubycritic/core/smell_test.rb
|
246
250
|
- test/lib/rubycritic/core/smells_array_test.rb
|
@@ -250,6 +254,7 @@ files:
|
|
250
254
|
- test/lib/rubycritic/source_control_systems/source_control_system_test.rb
|
251
255
|
- test/lib/rubycritic/source_locator_test.rb
|
252
256
|
- test/lib/rubycritic/version_test.rb
|
257
|
+
- test/samples/empty.rb
|
253
258
|
- test/samples/flay/smelly.rb
|
254
259
|
- test/samples/flog/complex.rb
|
255
260
|
- test/samples/flog/smelly.rb
|
@@ -257,11 +262,11 @@ files:
|
|
257
262
|
- test/samples/location/file0.rb
|
258
263
|
- test/samples/location/file_with_different_extension.py
|
259
264
|
- test/samples/location/file_with_no_extension
|
265
|
+
- test/samples/methods_count.rb
|
266
|
+
- test/samples/module_names.rb
|
260
267
|
- test/samples/reek/not_smelly.rb
|
261
268
|
- test/samples/reek/smelly.rb
|
262
|
-
- test/samples/
|
263
|
-
- test/samples/stats/example.rb
|
264
|
-
- test/samples/stats/unparsable_example.rb
|
269
|
+
- test/samples/unparsable.rb
|
265
270
|
- test/test_helper.rb
|
266
271
|
homepage: https://github.com/whitesmith/rubycritic
|
267
272
|
licenses:
|
@@ -286,17 +291,18 @@ rubyforge_project:
|
|
286
291
|
rubygems_version: 2.4.1
|
287
292
|
signing_key:
|
288
293
|
specification_version: 4
|
289
|
-
summary: Ruby code
|
294
|
+
summary: RubyCritic is a Ruby code quality reporter
|
290
295
|
test_files:
|
291
296
|
- test/analysers_test_helper.rb
|
292
297
|
- test/lib/rubycritic/analysers/churn_test.rb
|
293
298
|
- test/lib/rubycritic/analysers/complexity_test.rb
|
299
|
+
- test/lib/rubycritic/analysers/helpers/methods_counter_test.rb
|
300
|
+
- test/lib/rubycritic/analysers/helpers/modules_locator_test.rb
|
294
301
|
- test/lib/rubycritic/analysers/smells/flay_test.rb
|
295
302
|
- test/lib/rubycritic/analysers/smells/flog_test.rb
|
296
303
|
- test/lib/rubycritic/analysers/smells/reek_test.rb
|
297
|
-
- test/lib/rubycritic/analysers/stats_test.rb
|
298
304
|
- test/lib/rubycritic/configuration_test.rb
|
299
|
-
- test/lib/rubycritic/core/
|
305
|
+
- test/lib/rubycritic/core/analysed_module_test.rb
|
300
306
|
- test/lib/rubycritic/core/location_test.rb
|
301
307
|
- test/lib/rubycritic/core/smell_test.rb
|
302
308
|
- test/lib/rubycritic/core/smells_array_test.rb
|
@@ -306,6 +312,7 @@ test_files:
|
|
306
312
|
- test/lib/rubycritic/source_control_systems/source_control_system_test.rb
|
307
313
|
- test/lib/rubycritic/source_locator_test.rb
|
308
314
|
- test/lib/rubycritic/version_test.rb
|
315
|
+
- test/samples/empty.rb
|
309
316
|
- test/samples/flay/smelly.rb
|
310
317
|
- test/samples/flog/complex.rb
|
311
318
|
- test/samples/flog/smelly.rb
|
@@ -313,9 +320,9 @@ test_files:
|
|
313
320
|
- test/samples/location/file0.rb
|
314
321
|
- test/samples/location/file_with_different_extension.py
|
315
322
|
- test/samples/location/file_with_no_extension
|
323
|
+
- test/samples/methods_count.rb
|
324
|
+
- test/samples/module_names.rb
|
316
325
|
- test/samples/reek/not_smelly.rb
|
317
326
|
- test/samples/reek/smelly.rb
|
318
|
-
- test/samples/
|
319
|
-
- test/samples/stats/example.rb
|
320
|
-
- test/samples/stats/unparsable_example.rb
|
327
|
+
- test/samples/unparsable.rb
|
321
328
|
- test/test_helper.rb
|