findbugs_translate_checkstyle_format 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a782a01eb2e2ce8a20684d03448c6a5b77de0b5f
4
- data.tar.gz: b1c0a0019c92d528dcf42466c4aa3149d3b3d1fb
3
+ metadata.gz: 929240f068947b98b1e5e25729365a00c6a8fa0b
4
+ data.tar.gz: 132a041eb4a679d5ab29c7cbe4b95bbe8a11aab2
5
5
  SHA512:
6
- metadata.gz: 8ad50c4749c2bd2c2ef51572e86dc301ddef4e321cbb07754a80e2a86c2fb6089824a30b3ac79d459156da72b27fcf06f095c91d5cd7cebff6e811f39af7243c
7
- data.tar.gz: 965fb1d8e7e323e1615bdf28f090e90902b45a67b2963a15877b1611f6d725218538791bf960729272bf3f8c8e1197c9b4dcf4894ad8df838989c07cc4f2f190
6
+ metadata.gz: '09d12e92628c8cc747bd6f1c87b7e3a79227e8d3808a1f18ba7fcdc223a39f0f513cc5b97ab6e9e8bc695c25078c68438108b870b89ab5f28268f5e9c6d13f68'
7
+ data.tar.gz: eaa5570703c524680a62f202118f15b7ec2bfaf55f290414296bd39193ec0789bdb1f7b33de0401de2fb375f672f9aec584001fc42896cf6de4425834d5e30b0
@@ -22,7 +22,14 @@ module FindbugsTranslateCheckstyleFormat
22
22
 
23
23
  bug_instances = [bug_instances] if bug_instances.is_a?(Hash)
24
24
  bug_instances.each do |bug_instance|
25
- source_lines = bug_instance['SourceLine']
25
+ source_lines =
26
+ if bug_instance.key?('SourceLine')
27
+ bug_instance['SourceLine']
28
+ elsif bug_instance['Class'].is_a?(Array)
29
+ bug_instance['Class'].map { |classes| classes['SourceLine'] }
30
+ else
31
+ bug_instance['Class']['SourceLine']
32
+ end
26
33
  source_lines = [source_lines] if source_lines.is_a?(Hash)
27
34
  source_lines.each do |source_line|
28
35
  file = checkstyle.add_element('file',
@@ -1,3 +1,3 @@
1
1
  module FindbugsTranslateCheckstyleFormat
2
- VERSION = '0.2.5'
2
+ VERSION = '0.2.6'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: findbugs_translate_checkstyle_format
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - noboru-i
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-23 00:00:00.000000000 Z
11
+ date: 2017-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  version: '0'
141
141
  requirements: []
142
142
  rubyforge_project:
143
- rubygems_version: 2.6.4
143
+ rubygems_version: 2.5.2
144
144
  signing_key:
145
145
  specification_version: 4
146
146
  summary: Translate findbugs format into checkstyle format.