code_analyzer 0.5.4 → 0.7.0
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 +4 -4
- data/.github/workflows/main.yml +2 -2
- data/.gitignore +0 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.md +127 -0
- data/Gemfile.lock +38 -0
- data/code_analyzer.gemspec +2 -1
- data/lib/code_analyzer/checker.rb +7 -7
- data/lib/code_analyzer/checking_visitor/default.rb +7 -7
- data/lib/code_analyzer/node.rb +1186 -0
- data/lib/code_analyzer/version.rb +1 -1
- data/lib/code_analyzer.rb +1 -3
- data/spec/code_analyzer/{sexp_spec.rb → node_spec.rb} +194 -195
- data/spec/spec_helper.rb +1 -1
- metadata +12 -16
- data/lib/code_analyzer/nil.rb +0 -36
- data/lib/code_analyzer/sexp.rb +0 -911
- data/spec/code_analyzer/nil_spec.rb +0 -39
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
|
@@ -1,29 +1,28 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: code_analyzer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Richard Huang
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
|
-
name:
|
|
13
|
+
name: prism
|
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
|
16
15
|
requirements:
|
|
17
16
|
- - ">="
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
18
|
+
version: 1.9.0
|
|
20
19
|
type: :runtime
|
|
21
20
|
prerelease: false
|
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
22
|
requirements:
|
|
24
23
|
- - ">="
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
|
-
version:
|
|
25
|
+
version: 1.9.0
|
|
27
26
|
- !ruby/object:Gem::Dependency
|
|
28
27
|
name: rspec
|
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -64,7 +63,9 @@ files:
|
|
|
64
63
|
- ".gitignore"
|
|
65
64
|
- ".rspec"
|
|
66
65
|
- ".ruby-version"
|
|
66
|
+
- CHANGELOG.md
|
|
67
67
|
- Gemfile
|
|
68
|
+
- Gemfile.lock
|
|
68
69
|
- LICENSE
|
|
69
70
|
- README.md
|
|
70
71
|
- Rakefile
|
|
@@ -76,23 +77,20 @@ files:
|
|
|
76
77
|
- lib/code_analyzer/checking_visitor/base.rb
|
|
77
78
|
- lib/code_analyzer/checking_visitor/default.rb
|
|
78
79
|
- lib/code_analyzer/checking_visitor/plain.rb
|
|
79
|
-
- lib/code_analyzer/
|
|
80
|
-
- lib/code_analyzer/sexp.rb
|
|
80
|
+
- lib/code_analyzer/node.rb
|
|
81
81
|
- lib/code_analyzer/version.rb
|
|
82
82
|
- lib/code_analyzer/warning.rb
|
|
83
83
|
- spec/code_analyzer/checker_spec.rb
|
|
84
84
|
- spec/code_analyzer/checking_visitor/base_spec.rb
|
|
85
85
|
- spec/code_analyzer/checking_visitor/default_spec.rb
|
|
86
86
|
- spec/code_analyzer/checking_visitor/plain_spec.rb
|
|
87
|
-
- spec/code_analyzer/
|
|
88
|
-
- spec/code_analyzer/sexp_spec.rb
|
|
87
|
+
- spec/code_analyzer/node_spec.rb
|
|
89
88
|
- spec/code_analyzer/warning_spec.rb
|
|
90
89
|
- spec/spec_helper.rb
|
|
91
90
|
homepage: https://github.com/flyerhzm/code_analyzer
|
|
92
91
|
licenses:
|
|
93
92
|
- MIT
|
|
94
93
|
metadata: {}
|
|
95
|
-
post_install_message:
|
|
96
94
|
rdoc_options: []
|
|
97
95
|
require_paths:
|
|
98
96
|
- lib
|
|
@@ -100,15 +98,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
100
98
|
requirements:
|
|
101
99
|
- - ">="
|
|
102
100
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: '
|
|
101
|
+
version: '3.3'
|
|
104
102
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
103
|
requirements:
|
|
106
104
|
- - ">="
|
|
107
105
|
- !ruby/object:Gem::Version
|
|
108
106
|
version: '0'
|
|
109
107
|
requirements: []
|
|
110
|
-
rubygems_version:
|
|
111
|
-
signing_key:
|
|
108
|
+
rubygems_version: 4.0.20
|
|
112
109
|
specification_version: 4
|
|
113
110
|
summary: a code analyzer helps you build your own code analyzer tool.
|
|
114
111
|
test_files:
|
|
@@ -116,7 +113,6 @@ test_files:
|
|
|
116
113
|
- spec/code_analyzer/checking_visitor/base_spec.rb
|
|
117
114
|
- spec/code_analyzer/checking_visitor/default_spec.rb
|
|
118
115
|
- spec/code_analyzer/checking_visitor/plain_spec.rb
|
|
119
|
-
- spec/code_analyzer/
|
|
120
|
-
- spec/code_analyzer/sexp_spec.rb
|
|
116
|
+
- spec/code_analyzer/node_spec.rb
|
|
121
117
|
- spec/code_analyzer/warning_spec.rb
|
|
122
118
|
- spec/spec_helper.rb
|
data/lib/code_analyzer/nil.rb
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module CodeAnalyzer
|
|
4
|
-
# Fake nil.
|
|
5
|
-
class Nil
|
|
6
|
-
# hash_size is 0.
|
|
7
|
-
def hash_size
|
|
8
|
-
0
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
# array_size is 0.
|
|
12
|
-
def array_size
|
|
13
|
-
0
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
# return self for to_s.
|
|
17
|
-
def to_s
|
|
18
|
-
self
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
# false
|
|
22
|
-
def present?
|
|
23
|
-
false
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
# true
|
|
27
|
-
def blank?
|
|
28
|
-
true
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
# return self.
|
|
32
|
-
def method_missing(method_sym, *arguments, &block)
|
|
33
|
-
self
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
end
|