roodi 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/Manifest.txt +0 -1
- data/README.txt +2 -27
- data/Rakefile +13 -16
- data/lib/roodi.rb +1 -1
- data/lib/roodi/checks/check.rb +9 -4
- data/lib/roodi/checks/class_name_check.rb +1 -1
- data/lib/roodi/checks/cyclomatic_complexity_block_check.rb +2 -2
- data/lib/roodi/checks/cyclomatic_complexity_method_check.rb +1 -1
- data/lib/roodi/checks/empty_rescue_body_check.rb +1 -1
- data/lib/roodi/checks/for_loop_check.rb +1 -1
- data/lib/roodi/checks/method_line_count_check.rb +2 -2
- data/lib/roodi/checks/method_name_check.rb +2 -2
- data/lib/roodi/core/checking_visitor.rb +2 -1
- data/lib/roodi/core/iterator_visitor.rb +0 -1
- data/lib/roodi/core/parse_tree_runner.rb +1 -0
- data/lib/roodi/core/parser.rb +1 -1
- data/lib/roodi/core/visitable_sexp.rb +0 -8
- data/roodi.yml +1 -0
- data/spec/checks/class_name_check_spec.rb +1 -1
- data/spec/checks/cyclomatic_complexity_block_check_spec.rb +2 -2
- data/spec/checks/cyclomatic_complexity_method_check_spec.rb +1 -1
- data/spec/checks/empty_rescue_body_check_spec.rb +2 -4
- data/spec/checks/for_loop_check_spec.rb +1 -1
- data/spec/checks/method_line_count_check_spec.rb +3 -6
- data/spec/checks/method_name_check_spec.rb +101 -2
- metadata +12 -3
- data/roodi.gemspec +0 -15
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
@@ -21,7 +21,6 @@ lib/roodi/core/iterator_visitor.rb
|
|
21
21
|
lib/roodi/core/parse_tree_runner.rb
|
22
22
|
lib/roodi/core/parser.rb
|
23
23
|
lib/roodi/core/visitable_sexp.rb
|
24
|
-
roodi.gemspec
|
25
24
|
roodi.yml
|
26
25
|
spec/checks/class_name_check_spec.rb
|
27
26
|
spec/checks/cyclomatic_complexity_block_check_spec.rb
|
data/README.txt
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
Roodi stands for Ruby Object Oriented Design Inferometer. It parses your Ruby code and warns you about design issues you have based on the checks that is has configured.
|
8
8
|
|
9
|
-
== SUPPORTED CHECKS
|
9
|
+
== SUPPORTED CHECKS:
|
10
10
|
|
11
11
|
* ClassNameCheck - Check that class names match convention.
|
12
12
|
* CyclomaticComplexityBlockCheck - Check that the cyclomatic complexity of all blocks is below the threshold.
|
@@ -14,6 +14,7 @@ Roodi stands for Ruby Object Oriented Design Inferometer. It parses your Ruby c
|
|
14
14
|
* EmptyRescueBodyCheck - Check that there are no empty rescue blocks.
|
15
15
|
* ForLoopCheck - Check that for loops aren't used (Use Enumerable.each instead)
|
16
16
|
* MethodNameCheck - Check that method names match convention.
|
17
|
+
* MethodLineCountCheck - Check that the number of lines in a method is below the threshold.
|
17
18
|
|
18
19
|
== SYNOPSIS:
|
19
20
|
|
@@ -47,29 +48,3 @@ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
47
48
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
48
49
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
49
50
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
== Introduction
|
54
|
-
|
55
|
-
Roodi is an acronym that stands for Ruby Object Oriented Design Inferometer. It parses your Ruby code and warns you about design issues you have based on the checks that is has configured.
|
56
|
-
|
57
|
-
== Usage
|
58
|
-
|
59
|
-
TBD. See the Rakefile in this project for an example of how to get started if you're on the bleeding edge.
|
60
|
-
|
61
|
-
== Background
|
62
|
-
|
63
|
-
Roodi is almost identical in design to the Java tool called Checkstyle (http://checkstyle.sf.net/), however it is named after the Java tool that I worked on called Joodi (http://joodi.checkstyle.net). I think it's more appropriate to name it similarly to Joodi than Checkstyle, because the checks exist to warn you about design issues, not style issues. Joodi has a different design, but a better name. I used a combination of each.
|
64
|
-
|
65
|
-
== Design
|
66
|
-
|
67
|
-
Roodi builds an Abstract Syntax Tree (AST) of the Ruby source code, then uses the visitor patten to walk every node in the tree and see if the checks can infer any design issues with them. Usually, the existence of an AST would mean running a grammar file through a parser to build it. No such grammar file exists to build a complete representation of the source (including whitespace characters and comments) for the Ruby language, so I originally used the object model built by the JRuby team instead. That design soon switched to use ParseTree instead, which makes Roodi more portable (it doesn't depend on JRuby anymore), but slightly less functional (mainly because ParseTree doesn't support line numbers).
|
68
|
-
|
69
|
-
== Checks currently supported
|
70
|
-
ClassNameCheck Check that class names match convention.
|
71
|
-
CyclomaticComplexityBlockCheck Check that the cyclomatic complexity of all blocks is below the threshold.
|
72
|
-
CyclomaticComplexityMethodCheck Check that the cyclomatic complexity of all methods is below the threshold.
|
73
|
-
EmptyRescueBodyCheck Check that there are no empty rescue blocks.
|
74
|
-
ForLoopCheck Check that for loops aren't used (Use Enumerable.each instead)
|
75
|
-
MethodNameCheck Check that method names match convention.
|
data/Rakefile
CHANGED
@@ -6,6 +6,19 @@ require 'rake'
|
|
6
6
|
require 'spec/rake/spectask'
|
7
7
|
require 'roodi'
|
8
8
|
|
9
|
+
Hoe.new('roodi', Roodi::VERSION) do |p|
|
10
|
+
p.developer('Marty Andrews', 'marty@cogentconsulting.com.au')
|
11
|
+
p.extra_deps = ['ParseTree']
|
12
|
+
p.remote_rdoc_dir = ''
|
13
|
+
end
|
14
|
+
|
15
|
+
def roodi(ruby_files)
|
16
|
+
roodi = Roodi::Core::ParseTreeRunner.new
|
17
|
+
ruby_files.each { |file| roodi.check_file(file) }
|
18
|
+
roodi.errors.each {|error| puts error}
|
19
|
+
puts "\nFound #{roodi.errors.size} errors."
|
20
|
+
end
|
21
|
+
|
9
22
|
desc "Run all specs"
|
10
23
|
Spec::Rake::SpecTask.new('spec') do |t|
|
11
24
|
t.spec_files = FileList['spec/**/*spec.rb']
|
@@ -17,19 +30,3 @@ task :roodi do
|
|
17
30
|
roodi(Dir.glob(pattern))
|
18
31
|
end
|
19
32
|
|
20
|
-
task :roodi_runway do
|
21
|
-
pattern = File.join("/Users/marty/Data/runway", "**", "*.rb")
|
22
|
-
roodi(Dir.glob(pattern))
|
23
|
-
end
|
24
|
-
|
25
|
-
def roodi(ruby_files)
|
26
|
-
roodi = Roodi::Core::ParseTreeRunner.new
|
27
|
-
ruby_files.each { |file| roodi.check_file(file) }
|
28
|
-
roodi.errors.each {|error| puts error}
|
29
|
-
puts "\nFound #{roodi.errors.size} errors."
|
30
|
-
end
|
31
|
-
|
32
|
-
Hoe.new('roodi', Roodi::VERSION) do |p|
|
33
|
-
p.developer('Marty Andrews', 'marty@cogentconsulting.com.au')
|
34
|
-
p.remote_rdoc_dir = '' # Release to root
|
35
|
-
end
|
data/lib/roodi.rb
CHANGED
data/lib/roodi/checks/check.rb
CHANGED
@@ -5,12 +5,17 @@ module Roodi
|
|
5
5
|
@errors = []
|
6
6
|
end
|
7
7
|
|
8
|
-
def position(
|
9
|
-
|
8
|
+
def position(offset = 0)
|
9
|
+
"#{@line[2]}:#{@line[1] + offset}"
|
10
10
|
end
|
11
11
|
|
12
|
-
def
|
13
|
-
@
|
12
|
+
def evaluate_node_at_line(node, line)
|
13
|
+
@line = line
|
14
|
+
evaluate(node)
|
15
|
+
end
|
16
|
+
|
17
|
+
def add_error(error, offset = 0)
|
18
|
+
@errors << "#{position(offset)} - #{error}"
|
14
19
|
end
|
15
20
|
|
16
21
|
def errors
|
@@ -9,7 +9,7 @@ module Roodi
|
|
9
9
|
|
10
10
|
def evaluate(node)
|
11
11
|
pattern = /^[A-Z][a-zA-Z0-9]*$/
|
12
|
-
add_error "
|
12
|
+
add_error "Class name \"#{node[1]}\" should match pattern #{pattern.inspect}" unless node[1].to_s =~ pattern
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
@@ -8,12 +8,12 @@ module Roodi
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def interesting_nodes
|
11
|
-
[:
|
11
|
+
[:iter]
|
12
12
|
end
|
13
13
|
|
14
14
|
def evaluate(node)
|
15
15
|
complexity = count_complexity(node)
|
16
|
-
add_error "
|
16
|
+
add_error "Block cyclomatic complexity is #{complexity}. It should be #{@complexity} or less." unless complexity <= @complexity
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
@@ -13,7 +13,7 @@ module Roodi
|
|
13
13
|
|
14
14
|
def evaluate(node)
|
15
15
|
complexity = count_complexity(node)
|
16
|
-
add_error "
|
16
|
+
add_error "Method name \"#{node[1]}\" has a cyclomatic complexity is #{complexity}. It should be #{@complexity} or less." unless complexity <= @complexity
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
@@ -14,7 +14,7 @@ module Roodi
|
|
14
14
|
|
15
15
|
def evaluate(node)
|
16
16
|
line_count = count_lines(node)
|
17
|
-
add_error "
|
17
|
+
add_error "Method name \"#{node[1]}\" has #{line_count} lines. It should have #{@line_count} or less." unless line_count <= @line_count
|
18
18
|
end
|
19
19
|
|
20
20
|
private
|
@@ -22,7 +22,7 @@ module Roodi
|
|
22
22
|
def count_lines(node)
|
23
23
|
count = 0
|
24
24
|
count = count + 1 if node.node_type == :newline
|
25
|
-
node.
|
25
|
+
node.children.each {|node| count += count_lines(node)}
|
26
26
|
count
|
27
27
|
end
|
28
28
|
end
|
@@ -8,8 +8,8 @@ module Roodi
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def evaluate(node)
|
11
|
-
pattern = /^[a-z]+[a-z0-9_]*[
|
12
|
-
add_error "
|
11
|
+
pattern = /^[a-z<>=\[\]]+[a-z0-9_<>=\[\]]*[=!\?]?$/
|
12
|
+
add_error "Method name \"#{node[1]}\" should match pattern #{pattern.inspect}" unless node[1].to_s =~ pattern
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
@@ -14,8 +14,9 @@ module Roodi
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def visit(node)
|
17
|
+
@last_newline = node if node.node_type == :newline
|
17
18
|
checks = @checks[node.node_type]
|
18
|
-
checks.each {|check| check.
|
19
|
+
checks.each {|check| check.evaluate_node_at_line(node, @last_newline)} unless checks.nil?
|
19
20
|
nil
|
20
21
|
end
|
21
22
|
end
|
data/lib/roodi/core/parser.rb
CHANGED
data/roodi.yml
CHANGED
@@ -22,6 +22,6 @@ describe Roodi::Checks::ClassNameCheck do
|
|
22
22
|
@roodi.check_content(content)
|
23
23
|
errors = @roodi.errors
|
24
24
|
errors.should_not be_empty
|
25
|
-
errors[0].should eql("dummy-file.rb - Class name \"Bad_ClassName\" should match pattern
|
25
|
+
errors[0].should eql("dummy-file.rb:1 - Class name \"Bad_ClassName\" should match pattern /^[A-Z][a-zA-Z0-9]*$/")
|
26
26
|
end
|
27
27
|
end
|
@@ -9,13 +9,13 @@ describe Roodi::Checks::CyclomaticComplexityBlockCheck do
|
|
9
9
|
@roodi.check_content(content)
|
10
10
|
errors = @roodi.errors
|
11
11
|
errors.should_not be_empty
|
12
|
-
errors[0].should eql("dummy-file.rb - Block cyclomatic complexity is #{complexity}. It should be 0 or less.")
|
12
|
+
errors[0].should eql("dummy-file.rb:2 - Block cyclomatic complexity is #{complexity}. It should be 0 or less.")
|
13
13
|
end
|
14
14
|
|
15
15
|
it "should find a simple block" do
|
16
16
|
content = <<-END
|
17
17
|
def method_name
|
18
|
-
it "should be a
|
18
|
+
it "should be a simple block" do
|
19
19
|
call_foo
|
20
20
|
end
|
21
21
|
end
|
@@ -9,7 +9,7 @@ describe Roodi::Checks::CyclomaticComplexityMethodCheck do
|
|
9
9
|
@roodi.check_content(content)
|
10
10
|
errors = @roodi.errors
|
11
11
|
errors.should_not be_empty
|
12
|
-
errors[0].should eql("dummy-file.rb - Method name \"method_name\" has a cyclomatic complexity is #{complexity}. It should be 0 or less.")
|
12
|
+
errors[0].should eql("dummy-file.rb:1 - Method name \"method_name\" has a cyclomatic complexity is #{complexity}. It should be 0 or less.")
|
13
13
|
end
|
14
14
|
|
15
15
|
it "should find an if block" do
|
@@ -13,7 +13,6 @@ describe Roodi::Checks::EmptyRescueBodyCheck do
|
|
13
13
|
puts "Recover from the call"
|
14
14
|
end
|
15
15
|
END
|
16
|
-
# @roodi.print_content(content)
|
17
16
|
@roodi.check_content(content)
|
18
17
|
@roodi.errors.should be_empty
|
19
18
|
end
|
@@ -37,11 +36,10 @@ describe Roodi::Checks::EmptyRescueBodyCheck do
|
|
37
36
|
rescue
|
38
37
|
end
|
39
38
|
END
|
40
|
-
# @roodi.print_content(content)
|
41
39
|
@roodi.check_content(content)
|
42
40
|
errors = @roodi.errors
|
43
41
|
errors.should_not be_empty
|
44
|
-
errors[0].should eql("dummy-file.rb - Rescue block should not be empty.")
|
42
|
+
errors[0].should eql("dummy-file.rb:3 - Rescue block should not be empty.")
|
45
43
|
end
|
46
44
|
|
47
45
|
it "should reject an empty rescue block with a parameter" do
|
@@ -54,6 +52,6 @@ describe Roodi::Checks::EmptyRescueBodyCheck do
|
|
54
52
|
@roodi.check_content(content)
|
55
53
|
errors = @roodi.errors
|
56
54
|
errors.should_not be_empty
|
57
|
-
errors[0].should eql("dummy-file.rb - Rescue block should not be empty.")
|
55
|
+
errors[0].should eql("dummy-file.rb:3 - Rescue block should not be empty.")
|
58
56
|
end
|
59
57
|
end
|
@@ -13,6 +13,6 @@ describe Roodi::Checks::ForLoopCheck do
|
|
13
13
|
@roodi.check_content(content)
|
14
14
|
errors = @roodi.errors
|
15
15
|
errors.should_not be_empty
|
16
|
-
errors[0].should eql("dummy-file.rb - Don't use 'for' loops. Use Enumerable.each instead.")
|
16
|
+
errors[0].should eql("dummy-file.rb:1 - Don't use 'for' loops. Use Enumerable.each instead.")
|
17
17
|
end
|
18
18
|
end
|
@@ -6,7 +6,6 @@ describe Roodi::Checks::MethodLineCountCheck do
|
|
6
6
|
end
|
7
7
|
|
8
8
|
it "should accept methods with less lines than the threshold" do
|
9
|
-
pending "Support from ParseTree for newlines in methods"
|
10
9
|
content = <<-END
|
11
10
|
def zero_line_method
|
12
11
|
end
|
@@ -16,7 +15,6 @@ describe Roodi::Checks::MethodLineCountCheck do
|
|
16
15
|
end
|
17
16
|
|
18
17
|
it "should accept methods with the same number of lines as the threshold" do
|
19
|
-
pending "Support from ParseTree for newlines in methods"
|
20
18
|
content = <<-END
|
21
19
|
def one_line_method
|
22
20
|
1
|
@@ -27,16 +25,15 @@ describe Roodi::Checks::MethodLineCountCheck do
|
|
27
25
|
end
|
28
26
|
|
29
27
|
it "should reject methods with more lines than the threshold" do
|
30
|
-
pending "Support from ParseTree for newlines in methods"
|
31
28
|
content = <<-END
|
32
29
|
def two_line_method
|
33
|
-
1
|
34
|
-
2
|
30
|
+
puts 1
|
31
|
+
puts 2
|
35
32
|
end
|
36
33
|
END
|
37
34
|
@roodi.check_content(content)
|
38
35
|
errors = @roodi.errors
|
39
36
|
errors.should_not be_empty
|
40
|
-
errors[0].should eql("dummy-file.rb - Method name \"two_line_method\" has 2 lines. It should have 1 or less.")
|
37
|
+
errors[0].should eql("dummy-file.rb:1 - Method name \"two_line_method\" has 2 lines. It should have 1 or less.")
|
41
38
|
end
|
42
39
|
end
|
@@ -41,6 +41,105 @@ describe Roodi::Checks::MethodNameCheck do
|
|
41
41
|
@roodi.errors.should be_empty
|
42
42
|
end
|
43
43
|
|
44
|
+
it "should accept method names ending an equals sign" do
|
45
|
+
content = <<-END
|
46
|
+
def good_method_name=
|
47
|
+
end
|
48
|
+
END
|
49
|
+
@roodi.check_content(content)
|
50
|
+
@roodi.errors.should be_empty
|
51
|
+
end
|
52
|
+
|
53
|
+
it "should accept << as a method name" do
|
54
|
+
content = <<-END
|
55
|
+
def <<
|
56
|
+
end
|
57
|
+
END
|
58
|
+
@roodi.check_content(content)
|
59
|
+
@roodi.errors.should be_empty
|
60
|
+
end
|
61
|
+
|
62
|
+
it "should accept >> as a method name" do
|
63
|
+
content = <<-END
|
64
|
+
def >>
|
65
|
+
end
|
66
|
+
END
|
67
|
+
@roodi.check_content(content)
|
68
|
+
@roodi.errors.should be_empty
|
69
|
+
end
|
70
|
+
|
71
|
+
it "should accept == as a method name" do
|
72
|
+
content = <<-END
|
73
|
+
def ==
|
74
|
+
end
|
75
|
+
END
|
76
|
+
@roodi.check_content(content)
|
77
|
+
@roodi.errors.should be_empty
|
78
|
+
end
|
79
|
+
|
80
|
+
it "should accept === as a method name" do
|
81
|
+
content = <<-END
|
82
|
+
def ===
|
83
|
+
end
|
84
|
+
END
|
85
|
+
@roodi.check_content(content)
|
86
|
+
@roodi.errors.should be_empty
|
87
|
+
end
|
88
|
+
|
89
|
+
it "should accept < as a method name" do
|
90
|
+
content = <<-END
|
91
|
+
def <
|
92
|
+
end
|
93
|
+
END
|
94
|
+
@roodi.check_content(content)
|
95
|
+
@roodi.errors.should be_empty
|
96
|
+
end
|
97
|
+
|
98
|
+
it "should accept <= as a method name" do
|
99
|
+
content = <<-END
|
100
|
+
def <=
|
101
|
+
end
|
102
|
+
END
|
103
|
+
@roodi.check_content(content)
|
104
|
+
@roodi.errors.should be_empty
|
105
|
+
end
|
106
|
+
|
107
|
+
it "should accept > as a method name" do
|
108
|
+
content = <<-END
|
109
|
+
def >
|
110
|
+
end
|
111
|
+
END
|
112
|
+
@roodi.check_content(content)
|
113
|
+
@roodi.errors.should be_empty
|
114
|
+
end
|
115
|
+
|
116
|
+
it "should accept >= as a method name" do
|
117
|
+
content = <<-END
|
118
|
+
def >=
|
119
|
+
end
|
120
|
+
END
|
121
|
+
@roodi.check_content(content)
|
122
|
+
@roodi.errors.should be_empty
|
123
|
+
end
|
124
|
+
|
125
|
+
it "should accept [] as a method name" do
|
126
|
+
content = <<-END
|
127
|
+
def []
|
128
|
+
end
|
129
|
+
END
|
130
|
+
@roodi.check_content(content)
|
131
|
+
@roodi.errors.should be_empty
|
132
|
+
end
|
133
|
+
|
134
|
+
it "should accept []= as a method name" do
|
135
|
+
content = <<-END
|
136
|
+
def []=
|
137
|
+
end
|
138
|
+
END
|
139
|
+
@roodi.check_content(content)
|
140
|
+
@roodi.errors.should be_empty
|
141
|
+
end
|
142
|
+
|
44
143
|
it "should reject camel case method names" do
|
45
144
|
content = <<-END
|
46
145
|
def badMethodName
|
@@ -48,7 +147,7 @@ describe Roodi::Checks::MethodNameCheck do
|
|
48
147
|
END
|
49
148
|
@roodi.check_content(content)
|
50
149
|
errors = @roodi.errors
|
51
|
-
errors.should_not be_empty
|
52
|
-
errors[0].should eql("dummy-file.rb - Method name \"badMethodName\" should match pattern
|
150
|
+
errors.should_not be_empty
|
151
|
+
errors[0].should eql("dummy-file.rb:1 - Method name \"badMethodName\" should match pattern /^[a-z<>=\\[\\]]+[a-z0-9_<>=\\[\\]]*[=!\\?]?$/")
|
53
152
|
end
|
54
153
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roodi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marty Andrews
|
@@ -9,9 +9,19 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-09-
|
12
|
+
date: 2008-09-09 00:00:00 +10:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: ParseTree
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
24
|
+
version:
|
15
25
|
- !ruby/object:Gem::Dependency
|
16
26
|
name: hoe
|
17
27
|
type: :development
|
@@ -58,7 +68,6 @@ files:
|
|
58
68
|
- lib/roodi/core/parse_tree_runner.rb
|
59
69
|
- lib/roodi/core/parser.rb
|
60
70
|
- lib/roodi/core/visitable_sexp.rb
|
61
|
-
- roodi.gemspec
|
62
71
|
- roodi.yml
|
63
72
|
- spec/checks/class_name_check_spec.rb
|
64
73
|
- spec/checks/cyclomatic_complexity_block_check_spec.rb
|
data/roodi.gemspec
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
Gem::Specification.new do |s|
|
2
|
-
s.name = "roodi"
|
3
|
-
s.version = "0.1.1"
|
4
|
-
s.platform = "jruby"
|
5
|
-
s.summary = "Ruby Object Oriented Design Inferometer"
|
6
|
-
s.email = "marty@martyandrews.net"
|
7
|
-
s.homepage = "https://github.com/martinjandrews/roodi"
|
8
|
-
s.description = "Roodi parses your Ruby code and warns you about design issues you have based on the checks that is has configured."
|
9
|
-
s.has_rdoc = true
|
10
|
-
s.author = "Marty Andrews"
|
11
|
-
s.files = ["CHANGELOG", "LICENSE", "README", "Rakefile", "bin/roodi", "bin/roodi-describe", "lib/roodi", "lib/roodi/checks", "lib/roodi/checks/check.rb", "lib/roodi/checks/class_name_check.rb", "lib/roodi/checks/cyclomatic_complexity_block_check.rb", "lib/roodi/checks/cyclomatic_complexity_check.rb", "lib/roodi/checks/cyclomatic_complexity_method_check.rb", "lib/roodi/checks/empty_rescue_body_check.rb", "lib/roodi/checks/for_loop_check.rb", "lib/roodi/checks/method_line_count_check.rb", "lib/roodi/checks/method_name_check.rb", "lib/roodi/checks.rb", "lib/roodi/core", "lib/roodi/core/checking_visitor.rb", "lib/roodi/core/iterator_visitor.rb", "lib/roodi/core/printing_visitor.rb", "lib/roodi/core/runner.rb", "lib/roodi/core/tree_walker.rb", "lib/roodi/core.rb", "lib/roodi/jruby", "lib/roodi/jruby/ast", "lib/roodi/jruby/ast/node.rb", "lib/roodi/jruby/ast/when_node.rb", "lib/roodi/jruby/ast.rb", "lib/roodi/jruby.rb", "lib/roodi.rb", "lib/tasks", "spec/checks", "spec/checks/class_name_check_spec.rb", "spec/checks/cyclomatic_complexity_block_check_spec.rb", "spec/checks/cyclomatic_complexity_method_check_spec.rb", "spec/checks/empty_rescue_body_check_spec.rb", "spec/checks/for_loop_check_spec.rb", "spec/checks/method_line_count_check_spec.rb", "spec/checks/method_name_check_spec.rb", "spec/spec_helper.rb"]
|
12
|
-
# s.test_files = ["spec/checks", "spec/checks/class_name_check_spec.rb", "spec/checks/cyclomatic_complexity_block_check_spec.rb", "spec/checks/cyclomatic_complexity_method_check_spec.rb", "spec/checks/empty_rescue_body_check_spec.rb", "spec/checks/for_loop_check_spec.rb", "spec/checks/method_line_count_check_spec.rb", "spec/checks/method_name_check_spec.rb", "spec/spec_helper.rb"]
|
13
|
-
s.rdoc_options = ['--quiet', '--title', 'The Roodi Reference', '--main', 'README', '--inline-source']
|
14
|
-
s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README"]
|
15
|
-
end
|