debride 1.5.0 → 1.5.1
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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/History.rdoc +6 -0
- data/README.rdoc +2 -0
- data/Rakefile +2 -1
- data/lib/debride.rb +3 -2
- metadata +4 -4
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 940626014070c225b026dfb66c2447942dc3b3e1
|
4
|
+
data.tar.gz: bae7f08f057b29e7045d1641b6ee69466127e0c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78711d1f9bb7e3076fd4c8d0513fa15636039b76efbe8a92616fd50ff2b4f224e1c38ad5a75d15704e8151866fa1807a83cf6af8dd50c9a802a61af9b6b4b521
|
7
|
+
data.tar.gz: 6fabb380cc55ff7b23d1cb8e1da189ac1ff2187bffb7f23fc1e3a19f6f0f1f6016b68de6f4cbdc4138c8c79791b8049238412fa17b08c18fcfa9e2817f639809
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/History.rdoc
CHANGED
data/README.rdoc
CHANGED
@@ -12,6 +12,8 @@ Analyze code for potentially uncalled / dead methods.
|
|
12
12
|
* Static analysis of code. Can be easily hooked up to a CI.
|
13
13
|
* As with all static analysis tools of dynamic languages, can't be 100%.
|
14
14
|
* Whitelisting known good methods by name or regexp.
|
15
|
+
* Use --rails for Rails-specific domain knowledge.
|
16
|
+
* Use `debride_rails_whitelist` to generate an emperical whitelist from logs.
|
15
17
|
|
16
18
|
== SYNOPSIS:
|
17
19
|
|
data/Rakefile
CHANGED
@@ -18,11 +18,12 @@ end
|
|
18
18
|
def run dir, wl
|
19
19
|
ENV["GEM_HOME"] = "tmp/isolate/ruby-2.0.0"
|
20
20
|
ENV["GEM_PATH"] = "../../debride-erb/dev/tmp/isolate/ruby-2.0.0"
|
21
|
+
verbose = ENV["V"] ? "-v" : ""
|
21
22
|
|
22
23
|
abort "Specify dir to scan with D=<path>" unless dir
|
23
24
|
wl = "--whitelist #{wl}" if wl
|
24
25
|
|
25
|
-
ruby "-Ilib:../../debride-erb/dev/lib bin/debride --rails #{dir} #{wl}"
|
26
|
+
ruby "-Ilib:../../debride-erb/dev/lib bin/debride --rails #{verbose} #{dir} #{wl}"
|
26
27
|
end
|
27
28
|
|
28
29
|
task :run do
|
data/lib/debride.rb
CHANGED
@@ -19,7 +19,7 @@ end
|
|
19
19
|
# A static code analyzer that points out possible dead methods.
|
20
20
|
|
21
21
|
class Debride < MethodBasedSexpProcessor
|
22
|
-
VERSION = "1.5.
|
22
|
+
VERSION = "1.5.1" # :nodoc:
|
23
23
|
PROJECT = "debride"
|
24
24
|
|
25
25
|
def self.expand_dirs_to_files *dirs # TODO: push back up to sexp_processor
|
@@ -111,7 +111,8 @@ class Debride < MethodBasedSexpProcessor
|
|
111
111
|
raise "Unhandled type: #{path_or_io.class}:#{path_or_io.inspect}"
|
112
112
|
end
|
113
113
|
|
114
|
-
RubyParser.for_current_ruby
|
114
|
+
rp = RubyParser.for_current_ruby rescue RubyParser.new
|
115
|
+
rp.process(file, path, option[:timeout])
|
115
116
|
rescue Racc::ParseError => e
|
116
117
|
warn "Parse Error parsing #{path}. Skipping."
|
117
118
|
warn " #{e.message}"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: debride
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Davis
|
@@ -29,7 +29,7 @@ cert_chain:
|
|
29
29
|
xJcC6UN6NHMOVMyAXsr2HR0gRRx4ofN1LoP2KhXzSr8UMvQYlwPmE0N5GQv1b5AO
|
30
30
|
VpzF30vNaJK6ZT7xlIsIlwmH
|
31
31
|
-----END CERTIFICATE-----
|
32
|
-
date: 2015-
|
32
|
+
date: 2015-08-10 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: sexp_processor
|
@@ -65,14 +65,14 @@ dependencies:
|
|
65
65
|
requirements:
|
66
66
|
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '5.
|
68
|
+
version: '5.8'
|
69
69
|
type: :development
|
70
70
|
prerelease: false
|
71
71
|
version_requirements: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '5.
|
75
|
+
version: '5.8'
|
76
76
|
- !ruby/object:Gem::Dependency
|
77
77
|
name: rdoc
|
78
78
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.sig
CHANGED
Binary file
|