pronto-findbugs 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +2 -0
- data/lib/pronto/findbugs.rb +6 -4
- data/lib/pronto/findbugs/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 02210d2fbe8cb95971d95e47f84be0b61caa875d
|
4
|
+
data.tar.gz: bdea5a302aead013636a86ef3e5c2923a3d20e20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1abd396416a7bdde43f19dc380f0e6789a52c4b4a55d1a0bea9c0781f9a7fb41966b2f54757301815bd77e36b723ac78288acbadec69e7df3df60544f98b99b
|
7
|
+
data.tar.gz: 4651a51e8b326815a62efdda73bd501a53247ace7a8ee650249de690d1c37fef1a3d54f2666e0bfb30b40c4193d619e8dc802850ad8714d51ddb3f5cd8beb2cc
|
data/README.md
CHANGED
@@ -14,6 +14,8 @@ You need to specify location of findbugs reports by passing `PRONTO_FINDBUGS_REP
|
|
14
14
|
PRONTO_FINDBUGS_REPORTS_DIR=build/reports/spotbugs/ pronto run --index
|
15
15
|
```
|
16
16
|
|
17
|
+
See [seikichi/pronto-checkstyle-findbugs-example](https://github.com/seikichi/pronto-checkstyle-findbugs-example) for more details.
|
18
|
+
|
17
19
|
## Installation
|
18
20
|
|
19
21
|
Add this line to your application's Gemfile:
|
data/lib/pronto/findbugs.rb
CHANGED
@@ -17,7 +17,7 @@ module Pronto
|
|
17
17
|
Offence = Struct.new(:path, :line, :message)
|
18
18
|
|
19
19
|
def findbugs_reports_dir
|
20
|
-
ENV['PRONTO_FINDBUGS_REPORTS_DIR'] || (raise 'Please set `
|
20
|
+
ENV['PRONTO_FINDBUGS_REPORTS_DIR'] || (raise 'Please set `PRONTO_FINDBUGS_REPORTS_DIR` to use pronto-findbugs')
|
21
21
|
end
|
22
22
|
|
23
23
|
def valid_patch?(patch)
|
@@ -47,10 +47,12 @@ module Pronto
|
|
47
47
|
src_dirs = REXML::XPath.match(doc, '/BugCollection/Project/SrcDir/text()')
|
48
48
|
return [] if src_dirs.empty?
|
49
49
|
|
50
|
-
src = src_dirs.first.to_s
|
51
50
|
REXML::XPath.match(doc, '/BugCollection/BugInstance').map do |bug|
|
52
|
-
|
53
|
-
|
51
|
+
src = src_dirs.find { |s| File.exist?(path_from(bug, s.to_s)) }
|
52
|
+
next unless src
|
53
|
+
|
54
|
+
Offence.new(path_from(bug, src.to_s), line_from(bug), message_from(bug))
|
55
|
+
end.compact
|
54
56
|
end
|
55
57
|
|
56
58
|
def path_from(bug_node, root)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pronto-findbugs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seiichi KONDO
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pronto
|
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
151
|
version: '0'
|
152
152
|
requirements: []
|
153
153
|
rubyforge_project:
|
154
|
-
rubygems_version: 2.
|
154
|
+
rubygems_version: 2.5.2.1
|
155
155
|
signing_key:
|
156
156
|
specification_version: 4
|
157
157
|
summary: Pronto runner for findbugs / spotbugs
|