code_analyzer 0.4.5 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84254a2c93bfef8fd24e54f1830729c22cb24cb9
|
4
|
+
data.tar.gz: d098c0883a5b139a4147118045f2c6ce3a76e034
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: baddc030af7af45aba9b808432ea3374dd10231d0b1f4c1d0624499bb27319762405e2f318a42cf0a4102ac81833ccd1b535e0813e4ddfb9fa50a996bbf7ea18
|
7
|
+
data.tar.gz: 0da69c9d2fc22b0db89a84b5b0f3435b06e1cfcb81cad98de5ead1bd34e89cbcdc8615b695d82b11155d1cfc608db4c1604ab4dfb52ab8dcdec397ea85d22136
|
data/.rspec
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
--format
|
1
|
+
--format documentation
|
2
2
|
--color
|
data/.travis.yml
CHANGED
@@ -12,7 +12,7 @@ module CodeAnalyzer::CheckingVisitor
|
|
12
12
|
@checks[node].uniq!
|
13
13
|
end
|
14
14
|
end
|
15
|
-
|
15
|
+
end
|
16
16
|
|
17
17
|
# check the ruby sexp nodes for the ruby file.
|
18
18
|
#
|
@@ -56,7 +56,7 @@ module CodeAnalyzer::CheckingVisitor
|
|
56
56
|
end
|
57
57
|
node.children.each { |child_node|
|
58
58
|
child_node.file = node.file
|
59
|
-
child_node
|
59
|
+
check_node(child_node)
|
60
60
|
}
|
61
61
|
if checkers
|
62
62
|
checkers.each { |checker| checker.node_end(node) if checker.parse_file?(node.file) }
|
@@ -29,12 +29,12 @@ module CodeAnalyzer
|
|
29
29
|
context "#parse_file?" do
|
30
30
|
it "should return true if node_file matches pattern" do
|
31
31
|
allow(checker).to receive(:interesting_files).and_return([/spec\/.*\.rb/, /lib\/.*\.rb/])
|
32
|
-
expect(checker.parse_file?("lib/code_analyzer.rb")).to
|
32
|
+
expect(checker.parse_file?("lib/code_analyzer.rb")).to be true
|
33
33
|
end
|
34
34
|
|
35
35
|
it "should return false if node_file doesn't match pattern" do
|
36
36
|
allow(checker).to receive(:interesting_files).and_return([/spec\/.*\.rb/])
|
37
|
-
expect(checker.parse_file?("lib/code_analyzer.rb")).to
|
37
|
+
expect(checker.parse_file?("lib/code_analyzer.rb")).to be false
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
@@ -11,7 +11,7 @@ module CodeAnalyzer::CheckingVisitor
|
|
11
11
|
content = "content"
|
12
12
|
expect(checker1).to receive(:parse_file?).and_return(false)
|
13
13
|
expect(checker2).to receive(:parse_file?).and_return(true)
|
14
|
-
checker1.
|
14
|
+
expect(checker1).not_to receive(:check).with(filename, content)
|
15
15
|
expect(checker2).to receive(:check).with(filename, content)
|
16
16
|
|
17
17
|
visitor.check(filename, content)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: code_analyzer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Huang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sexp_processor
|
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
107
|
version: '0'
|
108
108
|
requirements: []
|
109
109
|
rubyforge_project:
|
110
|
-
rubygems_version: 2.
|
110
|
+
rubygems_version: 2.5.1
|
111
111
|
signing_key:
|
112
112
|
specification_version: 4
|
113
113
|
summary: a code analyzer helps you build your own code analyzer tool.
|