rubocop-checkstyle_formatter 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +7 -0
  2. data/.travis.yml +17 -19
  3. data/Appraisals +8 -7
  4. data/README.md +3 -3
  5. data/gemfiles/rubocop_0.20.1.gemfile.lock +2 -2
  6. data/gemfiles/rubocop_0.21.0.gemfile.lock +2 -2
  7. data/gemfiles/rubocop_0.22.0.gemfile.lock +2 -2
  8. data/gemfiles/rubocop_0.23.0.gemfile.lock +2 -2
  9. data/gemfiles/{rubocop_0.14.1.gemfile → rubocop_0.24.0.gemfile} +1 -1
  10. data/gemfiles/{rubocop_0.19.1.gemfile.lock → rubocop_0.24.0.gemfile.lock} +6 -6
  11. data/gemfiles/{rubocop_0.16.0.gemfile → rubocop_0.25.0.gemfile} +1 -1
  12. data/gemfiles/{rubocop_0.18.1.gemfile.lock → rubocop_0.25.0.gemfile.lock} +10 -10
  13. data/gemfiles/{rubocop_0.15.0.gemfile → rubocop_0.26.1.gemfile} +1 -1
  14. data/gemfiles/{rubocop_0.14.1.gemfile.lock → rubocop_0.26.1.gemfile.lock} +14 -9
  15. data/gemfiles/{rubocop_0.17.0.gemfile → rubocop_0.27.1.gemfile} +1 -1
  16. data/gemfiles/{rubocop_0.15.0.gemfile.lock → rubocop_0.27.1.gemfile.lock} +15 -10
  17. data/gemfiles/rubocop_0.28.0.gemfile +7 -0
  18. data/gemfiles/rubocop_0.28.0.gemfile.lock +51 -0
  19. data/gemfiles/rubocop_0.29.1.gemfile +7 -0
  20. data/gemfiles/rubocop_0.29.1.gemfile.lock +49 -0
  21. data/gemfiles/rubocop_0.30.1.gemfile +7 -0
  22. data/gemfiles/rubocop_0.30.1.gemfile.lock +49 -0
  23. data/lib/rubocop/formatter/checkstyle_formatter.rb +6 -1
  24. data/rubocop-checkstyle_formatter.gemspec +2 -2
  25. data/spec/rubocop/formatter/checkstyle_formatter_spec.rb +13 -8
  26. metadata +35 -51
  27. data/gemfiles/rubocop_0.16.0.gemfile.lock +0 -46
  28. data/gemfiles/rubocop_0.17.0.gemfile.lock +0 -48
  29. data/gemfiles/rubocop_0.18.1.gemfile +0 -7
  30. data/gemfiles/rubocop_0.19.1.gemfile +0 -7
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ddaf0ea9440c4c124c00d85e427c24e79a6e597b
4
+ data.tar.gz: 0b60f04ae76801790dfee9473f936663be341cc0
5
+ SHA512:
6
+ metadata.gz: 17184e9c506338b56e06db80bda1c1d6d78e2d795c510ff527293f55973c1c2e1a9619cc7524eb0717cdf6624860b87667246da54f7875886dac1bf8c600b8ec
7
+ data.tar.gz: 50f2b1afb2c3b614c8fbf32b7daed1cee894b83db24787d13ae43f5993664ac6ff018450c746e02e4f8e8f1a9a6fa6a7bb9de8474a15862d1b20bed3398c8c16
@@ -2,35 +2,33 @@ language: ruby
2
2
  rvm:
3
3
  - 1.9.3
4
4
  - 2.0.0
5
- - 2.1.0
5
+ - 2.1.6
6
+ - 2.2.2
6
7
  - ruby-head
7
8
  - jruby-19mode
8
9
  - rbx-2
9
10
  gemfile:
10
- - gemfiles/rubocop_0.14.1.gemfile
11
- - gemfiles/rubocop_0.15.0.gemfile
12
- - gemfiles/rubocop_0.16.0.gemfile
13
- - gemfiles/rubocop_0.17.0.gemfile
14
- - gemfiles/rubocop_0.18.1.gemfile
15
- - gemfiles/rubocop_0.19.1.gemfile
16
11
  - gemfiles/rubocop_0.20.1.gemfile
17
12
  - gemfiles/rubocop_0.21.0.gemfile
18
13
  - gemfiles/rubocop_0.22.0.gemfile
19
14
  - gemfiles/rubocop_0.23.0.gemfile
15
+ - gemfiles/rubocop_0.24.0.gemfile
16
+ - gemfiles/rubocop_0.25.0.gemfile
17
+ - gemfiles/rubocop_0.26.1.gemfile
18
+ - gemfiles/rubocop_0.27.1.gemfile
19
+ - gemfiles/rubocop_0.28.0.gemfile
20
+ - gemfiles/rubocop_0.29.1.gemfile
21
+ - gemfiles/rubocop_0.30.1.gemfile
20
22
  matrix:
21
23
  exclude:
22
- - rvm: 2.1.0
23
- gemfile: gemfiles/rubocop_0.14.1.gemfile
24
- - rvm: 2.1.0
25
- gemfile: gemfiles/rubocop_0.15.0.gemfile
26
- - rvm: 2.1.0
27
- gemfile: gemfiles/rubocop_0.16.0.gemfile
28
- - rvm: 2.1.0
29
- gemfile: gemfiles/rubocop_0.17.0.gemfile
30
- - rvm: 2.1.0
31
- gemfile: gemfiles/rubocop_0.18.1.gemfile
32
- - rvm: 2.1.0
33
- gemfile: gemfiles/rubocop_0.19.1.gemfile
24
+ - rvm: 2.2.2
25
+ gemfile: gemfiles/rubocop_0.20.1.gemfile
26
+ - rvm: 2.2.2
27
+ gemfile: gemfiles/rubocop_0.21.0.gemfile
28
+ - rvm: 2.2.2
29
+ gemfile: gemfiles/rubocop_0.22.0.gemfile
30
+ - rvm: 2.2.2
31
+ gemfile: gemfiles/rubocop_0.23.0.gemfile
34
32
  allow_failures:
35
33
  - rvm: ruby-head
36
34
  before_install: gem update --remote bundler
data/Appraisals CHANGED
@@ -1,14 +1,15 @@
1
1
  [
2
- '0.14.1',
3
- '0.15.0',
4
- '0.16.0',
5
- '0.17.0',
6
- '0.18.1',
7
- '0.19.1',
8
2
  '0.20.1',
9
3
  '0.21.0',
10
4
  '0.22.0',
11
- '0.23.0'
5
+ '0.23.0',
6
+ '0.24.0',
7
+ '0.25.0',
8
+ '0.26.1',
9
+ '0.27.1',
10
+ '0.28.0',
11
+ '0.29.1',
12
+ '0.30.1'
12
13
  ].each do |version|
13
14
  appraise "rubocop-#{version}" do
14
15
  gem 'rubocop', version
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # RuboCop Checkstyle Formatter
2
2
 
3
3
  A formatter for [RuboCop](https://github.com/bbatsov/rubocop) that outputs in checkstyle format.
4
- It requires RuboCop version 0.14.0 or above.
4
+ It requires RuboCop version 0.20.1 or above.
5
5
 
6
6
  [![Build Status](https://travis-ci.org/eitoball/rubocop-checkstyle_formatter.svg?branch=master)](https://travis-ci.org/eitoball/rubocop-checkstyle_formatter)
7
7
 
@@ -22,11 +22,11 @@ Or install it yourself as:
22
22
  ## Usage
23
23
 
24
24
  $ rubocop --require rubocop/formatter/checkstyle_formatter --format RuboCop::Formatter::CheckstyleFormatter
25
-
25
+
26
26
  I use this formatter in Jenkins with [Violations plugin](https://wiki.jenkins-ci.org/display/JENKINS/Violations).
27
27
  As a part of build, I execute rubocop as shell script like:
28
28
 
29
- bundle exec rubocop --require rubocop/formatter/checkstyle_formatter --format RuboCop::Formatter::CheckstyleFormatter --no-color --silent --rails --out tmp/checkstyle.xml
29
+ bundle exec rubocop --require rubocop/formatter/checkstyle_formatter --format RuboCop::Formatter::CheckstyleFormatter --no-color --rails --out tmp/checkstyle.xml
30
30
 
31
31
  Then, after build, I add 'Report Violations' and configure xml filename pattern of checkstyle to "tmp/checkstyle.xml".
32
32
 
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- rubocop-checkstyle_formatter (0.1.1)
5
- rubocop (>= 0.14.0)
4
+ rubocop-checkstyle_formatter (0.2.0)
5
+ rubocop (>= 0.20.1)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- rubocop-checkstyle_formatter (0.1.1)
5
- rubocop (>= 0.14.0)
4
+ rubocop-checkstyle_formatter (0.2.0)
5
+ rubocop (>= 0.20.1)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- rubocop-checkstyle_formatter (0.1.1)
5
- rubocop (>= 0.14.0)
4
+ rubocop-checkstyle_formatter (0.2.0)
5
+ rubocop (>= 0.20.1)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- rubocop-checkstyle_formatter (0.1.1)
5
- rubocop (>= 0.14.0)
4
+ rubocop-checkstyle_formatter (0.2.0)
5
+ rubocop (>= 0.20.1)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rubocop", "0.14.1"
5
+ gem "rubocop", "0.24.0"
6
6
 
7
7
  gemspec :path => "../"
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- rubocop-checkstyle_formatter (0.1.1)
5
- rubocop (>= 0.14.0)
4
+ rubocop-checkstyle_formatter (0.2.0)
5
+ rubocop (>= 0.20.1)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -14,7 +14,7 @@ GEM
14
14
  ast (2.0.0)
15
15
  diff-lcs (1.2.5)
16
16
  json (1.8.1)
17
- parser (2.1.9)
17
+ parser (2.2.0.pre.2)
18
18
  ast (>= 1.1, < 3.0)
19
19
  slop (~> 3.4, >= 3.4.5)
20
20
  powerpack (0.0.9)
@@ -28,9 +28,9 @@ GEM
28
28
  rspec-expectations (2.14.5)
29
29
  diff-lcs (>= 1.1.3, < 2.0)
30
30
  rspec-mocks (2.14.6)
31
- rubocop (0.19.1)
31
+ rubocop (0.24.0)
32
32
  json (>= 1.7.7, < 2)
33
- parser (~> 2.1.7)
33
+ parser (>= 2.2.0.pre.2, < 3.0)
34
34
  powerpack (~> 0.0.6)
35
35
  rainbow (>= 1.99.1, < 3.0)
36
36
  ruby-progressbar (~> 1.4)
@@ -46,5 +46,5 @@ DEPENDENCIES
46
46
  bundler (~> 1.3)
47
47
  rake (~> 10.1)
48
48
  rspec (~> 2.14.0)
49
- rubocop (= 0.19.1)
49
+ rubocop (= 0.24.0)
50
50
  rubocop-checkstyle_formatter!
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rubocop", "0.16.0"
5
+ gem "rubocop", "0.25.0"
6
6
 
7
7
  gemspec :path => "../"
@@ -1,20 +1,19 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- rubocop-checkstyle_formatter (0.1.1)
5
- rubocop (>= 0.14.0)
4
+ rubocop-checkstyle_formatter (0.2.0)
5
+ rubocop (>= 0.20.1)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- appraisal (1.0.0)
10
+ appraisal (1.0.2)
11
11
  bundler
12
12
  rake
13
13
  thor (>= 0.14.0)
14
14
  ast (2.0.0)
15
15
  diff-lcs (1.2.5)
16
- json (1.8.1)
17
- parser (2.1.9)
16
+ parser (2.2.0.pre.4)
18
17
  ast (>= 1.1, < 3.0)
19
18
  slop (~> 3.4, >= 3.4.5)
20
19
  powerpack (0.0.9)
@@ -28,12 +27,13 @@ GEM
28
27
  rspec-expectations (2.14.5)
29
28
  diff-lcs (>= 1.1.3, < 2.0)
30
29
  rspec-mocks (2.14.6)
31
- rubocop (0.18.1)
32
- json (>= 1.7.7, < 2)
33
- parser (~> 2.1.3)
30
+ rubocop (0.25.0)
31
+ parser (>= 2.2.0.pre.4, < 3.0)
34
32
  powerpack (~> 0.0.6)
35
33
  rainbow (>= 1.99.1, < 3.0)
36
- slop (3.5.0)
34
+ ruby-progressbar (~> 1.4)
35
+ ruby-progressbar (1.5.1)
36
+ slop (3.6.0)
37
37
  thor (0.19.1)
38
38
 
39
39
  PLATFORMS
@@ -44,5 +44,5 @@ DEPENDENCIES
44
44
  bundler (~> 1.3)
45
45
  rake (~> 10.1)
46
46
  rspec (~> 2.14.0)
47
- rubocop (= 0.18.1)
47
+ rubocop (= 0.25.0)
48
48
  rubocop-checkstyle_formatter!
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rubocop", "0.15.0"
5
+ gem "rubocop", "0.26.1"
6
6
 
7
7
  gemspec :path => "../"
@@ -1,19 +1,21 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- rubocop-checkstyle_formatter (0.1.1)
5
- rubocop (>= 0.14.0)
4
+ rubocop-checkstyle_formatter (0.2.0)
5
+ rubocop (>= 0.20.1)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- appraisal (1.0.0)
10
+ appraisal (1.0.2)
11
11
  bundler
12
12
  rake
13
13
  thor (>= 0.14.0)
14
14
  ast (2.0.0)
15
+ astrolabe (1.3.0)
16
+ parser (>= 2.2.0.pre.3, < 3.0)
15
17
  diff-lcs (1.2.5)
16
- parser (2.1.9)
18
+ parser (2.2.0.pre.4)
17
19
  ast (>= 1.1, < 3.0)
18
20
  slop (~> 3.4, >= 3.4.5)
19
21
  powerpack (0.0.9)
@@ -27,11 +29,14 @@ GEM
27
29
  rspec-expectations (2.14.5)
28
30
  diff-lcs (>= 1.1.3, < 2.0)
29
31
  rspec-mocks (2.14.6)
30
- rubocop (0.14.1)
31
- parser (~> 2.0)
32
+ rubocop (0.26.1)
33
+ astrolabe (~> 1.3)
34
+ parser (>= 2.2.0.pre.4, < 3.0)
32
35
  powerpack (~> 0.0.6)
33
- rainbow (>= 1.1.4)
34
- slop (3.5.0)
36
+ rainbow (>= 1.99.1, < 3.0)
37
+ ruby-progressbar (~> 1.4)
38
+ ruby-progressbar (1.5.1)
39
+ slop (3.6.0)
35
40
  thor (0.19.1)
36
41
 
37
42
  PLATFORMS
@@ -42,5 +47,5 @@ DEPENDENCIES
42
47
  bundler (~> 1.3)
43
48
  rake (~> 10.1)
44
49
  rspec (~> 2.14.0)
45
- rubocop (= 0.14.1)
50
+ rubocop (= 0.26.1)
46
51
  rubocop-checkstyle_formatter!
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rubocop", "0.17.0"
5
+ gem "rubocop", "0.27.1"
6
6
 
7
7
  gemspec :path => "../"
@@ -1,24 +1,26 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- rubocop-checkstyle_formatter (0.1.1)
5
- rubocop (>= 0.14.0)
4
+ rubocop-checkstyle_formatter (0.2.0)
5
+ rubocop (>= 0.20.1)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- appraisal (1.0.0)
10
+ appraisal (1.0.2)
11
11
  bundler
12
12
  rake
13
13
  thor (>= 0.14.0)
14
14
  ast (2.0.0)
15
+ astrolabe (1.3.0)
16
+ parser (>= 2.2.0.pre.3, < 3.0)
15
17
  diff-lcs (1.2.5)
16
- parser (2.1.9)
18
+ parser (2.2.0.pre.8)
17
19
  ast (>= 1.1, < 3.0)
18
20
  slop (~> 3.4, >= 3.4.5)
19
21
  powerpack (0.0.9)
20
22
  rainbow (2.0.0)
21
- rake (10.3.2)
23
+ rake (10.4.2)
22
24
  rspec (2.14.1)
23
25
  rspec-core (~> 2.14.0)
24
26
  rspec-expectations (~> 2.14.0)
@@ -27,11 +29,14 @@ GEM
27
29
  rspec-expectations (2.14.5)
28
30
  diff-lcs (>= 1.1.3, < 2.0)
29
31
  rspec-mocks (2.14.6)
30
- rubocop (0.15.0)
31
- parser (~> 2.0)
32
+ rubocop (0.27.1)
33
+ astrolabe (~> 1.3)
34
+ parser (>= 2.2.0.pre.7, < 3.0)
32
35
  powerpack (~> 0.0.6)
33
- rainbow (>= 1.1.4)
34
- slop (3.5.0)
36
+ rainbow (>= 1.99.1, < 3.0)
37
+ ruby-progressbar (~> 1.4)
38
+ ruby-progressbar (1.7.1)
39
+ slop (3.6.0)
35
40
  thor (0.19.1)
36
41
 
37
42
  PLATFORMS
@@ -42,5 +47,5 @@ DEPENDENCIES
42
47
  bundler (~> 1.3)
43
48
  rake (~> 10.1)
44
49
  rspec (~> 2.14.0)
45
- rubocop (= 0.15.0)
50
+ rubocop (= 0.27.1)
46
51
  rubocop-checkstyle_formatter!
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.28.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,51 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ rubocop-checkstyle_formatter (0.2.0)
5
+ rubocop (>= 0.20.1)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ appraisal (1.0.2)
11
+ bundler
12
+ rake
13
+ thor (>= 0.14.0)
14
+ ast (2.0.0)
15
+ astrolabe (1.3.0)
16
+ parser (>= 2.2.0.pre.3, < 3.0)
17
+ diff-lcs (1.2.5)
18
+ parser (2.2.0.pre.8)
19
+ ast (>= 1.1, < 3.0)
20
+ slop (~> 3.4, >= 3.4.5)
21
+ powerpack (0.0.9)
22
+ rainbow (2.0.0)
23
+ rake (10.4.2)
24
+ rspec (2.14.1)
25
+ rspec-core (~> 2.14.0)
26
+ rspec-expectations (~> 2.14.0)
27
+ rspec-mocks (~> 2.14.0)
28
+ rspec-core (2.14.8)
29
+ rspec-expectations (2.14.5)
30
+ diff-lcs (>= 1.1.3, < 2.0)
31
+ rspec-mocks (2.14.6)
32
+ rubocop (0.28.0)
33
+ astrolabe (~> 1.3)
34
+ parser (>= 2.2.0.pre.7, < 3.0)
35
+ powerpack (~> 0.0.6)
36
+ rainbow (>= 1.99.1, < 3.0)
37
+ ruby-progressbar (~> 1.4)
38
+ ruby-progressbar (1.7.1)
39
+ slop (3.6.0)
40
+ thor (0.19.1)
41
+
42
+ PLATFORMS
43
+ ruby
44
+
45
+ DEPENDENCIES
46
+ appraisal (~> 1.0.0)
47
+ bundler (~> 1.3)
48
+ rake (~> 10.1)
49
+ rspec (~> 2.14.0)
50
+ rubocop (= 0.28.0)
51
+ rubocop-checkstyle_formatter!
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.29.1"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,49 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ rubocop-checkstyle_formatter (0.2.0)
5
+ rubocop (>= 0.20.1)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ appraisal (1.0.3)
11
+ bundler
12
+ rake
13
+ thor (>= 0.14.0)
14
+ ast (2.0.0)
15
+ astrolabe (1.3.0)
16
+ parser (>= 2.2.0.pre.3, < 3.0)
17
+ diff-lcs (1.2.5)
18
+ parser (2.2.2.1)
19
+ ast (>= 1.1, < 3.0)
20
+ powerpack (0.1.0)
21
+ rainbow (2.0.0)
22
+ rake (10.4.2)
23
+ rspec (2.14.1)
24
+ rspec-core (~> 2.14.0)
25
+ rspec-expectations (~> 2.14.0)
26
+ rspec-mocks (~> 2.14.0)
27
+ rspec-core (2.14.8)
28
+ rspec-expectations (2.14.5)
29
+ diff-lcs (>= 1.1.3, < 2.0)
30
+ rspec-mocks (2.14.6)
31
+ rubocop (0.29.1)
32
+ astrolabe (~> 1.3)
33
+ parser (>= 2.2.0.1, < 3.0)
34
+ powerpack (~> 0.1)
35
+ rainbow (>= 1.99.1, < 3.0)
36
+ ruby-progressbar (~> 1.4)
37
+ ruby-progressbar (1.7.5)
38
+ thor (0.19.1)
39
+
40
+ PLATFORMS
41
+ ruby
42
+
43
+ DEPENDENCIES
44
+ appraisal (~> 1.0.0)
45
+ bundler (~> 1.3)
46
+ rake (~> 10.1)
47
+ rspec (~> 2.14.0)
48
+ rubocop (= 0.29.1)
49
+ rubocop-checkstyle_formatter!
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.30.1"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,49 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ rubocop-checkstyle_formatter (0.2.0)
5
+ rubocop (>= 0.20.1)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ appraisal (1.0.3)
11
+ bundler
12
+ rake
13
+ thor (>= 0.14.0)
14
+ ast (2.0.0)
15
+ astrolabe (1.3.0)
16
+ parser (>= 2.2.0.pre.3, < 3.0)
17
+ diff-lcs (1.2.5)
18
+ parser (2.2.2.1)
19
+ ast (>= 1.1, < 3.0)
20
+ powerpack (0.1.0)
21
+ rainbow (2.0.0)
22
+ rake (10.4.2)
23
+ rspec (2.14.1)
24
+ rspec-core (~> 2.14.0)
25
+ rspec-expectations (~> 2.14.0)
26
+ rspec-mocks (~> 2.14.0)
27
+ rspec-core (2.14.8)
28
+ rspec-expectations (2.14.5)
29
+ diff-lcs (>= 1.1.3, < 2.0)
30
+ rspec-mocks (2.14.6)
31
+ rubocop (0.30.1)
32
+ astrolabe (~> 1.3)
33
+ parser (>= 2.2.2.1, < 3.0)
34
+ powerpack (~> 0.1)
35
+ rainbow (>= 1.99.1, < 3.0)
36
+ ruby-progressbar (~> 1.4)
37
+ ruby-progressbar (1.7.5)
38
+ thor (0.19.1)
39
+
40
+ PLATFORMS
41
+ ruby
42
+
43
+ DEPENDENCIES
44
+ appraisal (~> 1.0.0)
45
+ bundler (~> 1.3)
46
+ rake (~> 10.1)
47
+ rspec (~> 2.14.0)
48
+ rubocop (= 0.30.1)
49
+ rubocop-checkstyle_formatter!
@@ -8,6 +8,7 @@ module RuboCop
8
8
  module Formatter
9
9
  # = This formatter reports in Checkstyle format.
10
10
  class CheckstyleFormatter < BaseFormatter
11
+ include PathUtil if defined?(PathUtil)
11
12
  def started(target_file)
12
13
  @document = REXML::Document.new.tap do |d|
13
14
  d << REXML::XMLDecl.new
@@ -17,7 +18,11 @@ module RuboCop
17
18
 
18
19
  def file_finished(file, offences)
19
20
  REXML::Element.new('file', @checkstyle).tap do |f|
20
- f.attributes['name'] = file
21
+ path_name = file
22
+ path_name = relative_path(file) if defined?(relative_path)
23
+ f.attributes['name'] = path_name
24
+ # f.attributes['name'] =
25
+ # defined?(PathUtil) ? PathUtil.relative_path(file) : file
21
26
  add_offences(f, offences)
22
27
  end
23
28
  end
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.name = 'rubocop-checkstyle_formatter'
7
- gem.version = '0.1.1'
7
+ gem.version = '0.2.0'
8
8
  gem.authors = ['Eito Katagiri']
9
9
  gem.email = ['eitoball@gmail.com']
10
10
  gem.description = %q{A formatter for rubocop that outputs in checkstyle format}
@@ -17,7 +17,7 @@ Gem::Specification.new do |gem|
17
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
18
  gem.require_paths = ['lib']
19
19
 
20
- gem.add_dependency 'rubocop', '>= 0.14.0'
20
+ gem.add_dependency 'rubocop', '>= 0.20.1'
21
21
  gem.add_development_dependency 'appraisal', '~> 1.0.0'
22
22
  gem.add_development_dependency 'bundler', '~> 1.3'
23
23
  gem.add_development_dependency 'rake', '~> 10.1'
@@ -24,7 +24,7 @@ module RuboCop
24
24
  end
25
25
  end
26
26
  let(:output) { StringIO.new }
27
- let(:file) { 'sample.rb' }
27
+ let(:file) { File.join(Dir.pwd, 'sample.rb') }
28
28
 
29
29
  before do
30
30
  formatter = described_class.new(output)
@@ -35,13 +35,18 @@ module RuboCop
35
35
 
36
36
  it 'should convert rubocop severity to checkstyle severity' do
37
37
  doc = REXML::Document.new(output.string)
38
- REXML::XPath.match(doc, '/checkstyle/file/error').each do |error|
39
- message = error.attribute('message').value
40
- severity = error.attribute('severity').value
41
- case message
42
- when 'refactor', 'convention'; expect(severity).to eq('info')
43
- when 'warning'; expect(severity).to eq('warning')
44
- when 'error', 'fatal'; expect(severity).to eq('error')
38
+ REXML::XPath.match(doc, '/checkstyle/file').each do |file|
39
+ if defined?(PathUtil)
40
+ expect(file.attribute('name').value).to eq('sample.rb')
41
+ end
42
+ REXML::XPath.match(file, '/error').each do |error|
43
+ message = error.attribute('message').value
44
+ severity = error.attribute('severity').value
45
+ case message
46
+ when 'refactor', 'convention'; expect(severity).to eq('info')
47
+ when 'warning'; expect(severity).to eq('warning')
48
+ when 'error', 'fatal'; expect(severity).to eq('error')
49
+ end
45
50
  end
46
51
  end
47
52
  end
metadata CHANGED
@@ -1,94 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-checkstyle_formatter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
5
- prerelease:
4
+ version: 0.2.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Eito Katagiri
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-06-05 00:00:00.000000000 Z
11
+ date: 2015-04-25 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rubocop
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
- version: 0.14.0
19
+ version: 0.20.1
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
- version: 0.14.0
26
+ version: 0.20.1
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: appraisal
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ~>
31
+ - - "~>"
36
32
  - !ruby/object:Gem::Version
37
33
  version: 1.0.0
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ~>
38
+ - - "~>"
44
39
  - !ruby/object:Gem::Version
45
40
  version: 1.0.0
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: bundler
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ~>
45
+ - - "~>"
52
46
  - !ruby/object:Gem::Version
53
47
  version: '1.3'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ~>
52
+ - - "~>"
60
53
  - !ruby/object:Gem::Version
61
54
  version: '1.3'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rake
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ~>
59
+ - - "~>"
68
60
  - !ruby/object:Gem::Version
69
61
  version: '10.1'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ~>
66
+ - - "~>"
76
67
  - !ruby/object:Gem::Version
77
68
  version: '10.1'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: rspec
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ~>
73
+ - - "~>"
84
74
  - !ruby/object:Gem::Version
85
75
  version: 2.14.0
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ~>
80
+ - - "~>"
92
81
  - !ruby/object:Gem::Version
93
82
  version: 2.14.0
94
83
  description: A formatter for rubocop that outputs in checkstyle format
@@ -98,25 +87,13 @@ executables: []
98
87
  extensions: []
99
88
  extra_rdoc_files: []
100
89
  files:
101
- - .gitignore
102
- - .travis.yml
90
+ - ".gitignore"
91
+ - ".travis.yml"
103
92
  - Appraisals
104
93
  - Gemfile
105
94
  - LICENSE.txt
106
95
  - README.md
107
96
  - Rakefile
108
- - gemfiles/rubocop_0.14.1.gemfile
109
- - gemfiles/rubocop_0.14.1.gemfile.lock
110
- - gemfiles/rubocop_0.15.0.gemfile
111
- - gemfiles/rubocop_0.15.0.gemfile.lock
112
- - gemfiles/rubocop_0.16.0.gemfile
113
- - gemfiles/rubocop_0.16.0.gemfile.lock
114
- - gemfiles/rubocop_0.17.0.gemfile
115
- - gemfiles/rubocop_0.17.0.gemfile.lock
116
- - gemfiles/rubocop_0.18.1.gemfile
117
- - gemfiles/rubocop_0.18.1.gemfile.lock
118
- - gemfiles/rubocop_0.19.1.gemfile
119
- - gemfiles/rubocop_0.19.1.gemfile.lock
120
97
  - gemfiles/rubocop_0.20.1.gemfile
121
98
  - gemfiles/rubocop_0.20.1.gemfile.lock
122
99
  - gemfiles/rubocop_0.21.0.gemfile
@@ -125,6 +102,20 @@ files:
125
102
  - gemfiles/rubocop_0.22.0.gemfile.lock
126
103
  - gemfiles/rubocop_0.23.0.gemfile
127
104
  - gemfiles/rubocop_0.23.0.gemfile.lock
105
+ - gemfiles/rubocop_0.24.0.gemfile
106
+ - gemfiles/rubocop_0.24.0.gemfile.lock
107
+ - gemfiles/rubocop_0.25.0.gemfile
108
+ - gemfiles/rubocop_0.25.0.gemfile.lock
109
+ - gemfiles/rubocop_0.26.1.gemfile
110
+ - gemfiles/rubocop_0.26.1.gemfile.lock
111
+ - gemfiles/rubocop_0.27.1.gemfile
112
+ - gemfiles/rubocop_0.27.1.gemfile.lock
113
+ - gemfiles/rubocop_0.28.0.gemfile
114
+ - gemfiles/rubocop_0.28.0.gemfile.lock
115
+ - gemfiles/rubocop_0.29.1.gemfile
116
+ - gemfiles/rubocop_0.29.1.gemfile.lock
117
+ - gemfiles/rubocop_0.30.1.gemfile
118
+ - gemfiles/rubocop_0.30.1.gemfile.lock
128
119
  - lib/rubocop/formatter/checkstyle_formatter.rb
129
120
  - rubocop-checkstyle_formatter.gemspec
130
121
  - spec/rubocop/formatter/checkstyle_formatter_spec.rb
@@ -132,33 +123,26 @@ files:
132
123
  homepage: https://github.com/eitoball/rubocop-checkstyle_formatter
133
124
  licenses:
134
125
  - MIT
126
+ metadata: {}
135
127
  post_install_message:
136
128
  rdoc_options: []
137
129
  require_paths:
138
130
  - lib
139
131
  required_ruby_version: !ruby/object:Gem::Requirement
140
- none: false
141
132
  requirements:
142
- - - ! '>='
133
+ - - ">="
143
134
  - !ruby/object:Gem::Version
144
135
  version: '0'
145
- segments:
146
- - 0
147
- hash: 3272514483018578912
148
136
  required_rubygems_version: !ruby/object:Gem::Requirement
149
- none: false
150
137
  requirements:
151
- - - ! '>='
138
+ - - ">="
152
139
  - !ruby/object:Gem::Version
153
140
  version: '0'
154
- segments:
155
- - 0
156
- hash: 3272514483018578912
157
141
  requirements: []
158
142
  rubyforge_project:
159
- rubygems_version: 1.8.23.2
143
+ rubygems_version: 2.4.5
160
144
  signing_key:
161
- specification_version: 3
145
+ specification_version: 4
162
146
  summary: A formatter for rubocop that outputs in checkstyle format
163
147
  test_files:
164
148
  - spec/rubocop/formatter/checkstyle_formatter_spec.rb
@@ -1,46 +0,0 @@
1
- PATH
2
- remote: ../
3
- specs:
4
- rubocop-checkstyle_formatter (0.1.1)
5
- rubocop (>= 0.14.0)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- appraisal (1.0.0)
11
- bundler
12
- rake
13
- thor (>= 0.14.0)
14
- ast (2.0.0)
15
- diff-lcs (1.2.5)
16
- parser (2.1.9)
17
- ast (>= 1.1, < 3.0)
18
- slop (~> 3.4, >= 3.4.5)
19
- powerpack (0.0.9)
20
- rainbow (2.0.0)
21
- rake (10.3.2)
22
- rspec (2.14.1)
23
- rspec-core (~> 2.14.0)
24
- rspec-expectations (~> 2.14.0)
25
- rspec-mocks (~> 2.14.0)
26
- rspec-core (2.14.8)
27
- rspec-expectations (2.14.5)
28
- diff-lcs (>= 1.1.3, < 2.0)
29
- rspec-mocks (2.14.6)
30
- rubocop (0.16.0)
31
- parser (~> 2.1)
32
- powerpack (~> 0.0.6)
33
- rainbow (>= 1.1.4)
34
- slop (3.5.0)
35
- thor (0.19.1)
36
-
37
- PLATFORMS
38
- ruby
39
-
40
- DEPENDENCIES
41
- appraisal (~> 1.0.0)
42
- bundler (~> 1.3)
43
- rake (~> 10.1)
44
- rspec (~> 2.14.0)
45
- rubocop (= 0.16.0)
46
- rubocop-checkstyle_formatter!
@@ -1,48 +0,0 @@
1
- PATH
2
- remote: ../
3
- specs:
4
- rubocop-checkstyle_formatter (0.1.1)
5
- rubocop (>= 0.14.0)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- appraisal (1.0.0)
11
- bundler
12
- rake
13
- thor (>= 0.14.0)
14
- ast (2.0.0)
15
- diff-lcs (1.2.5)
16
- json (1.8.1)
17
- parser (2.1.9)
18
- ast (>= 1.1, < 3.0)
19
- slop (~> 3.4, >= 3.4.5)
20
- powerpack (0.0.9)
21
- rainbow (1.99.2)
22
- rake (10.3.2)
23
- rspec (2.14.1)
24
- rspec-core (~> 2.14.0)
25
- rspec-expectations (~> 2.14.0)
26
- rspec-mocks (~> 2.14.0)
27
- rspec-core (2.14.8)
28
- rspec-expectations (2.14.5)
29
- diff-lcs (>= 1.1.3, < 2.0)
30
- rspec-mocks (2.14.6)
31
- rubocop (0.17.0)
32
- json (~> 1.8)
33
- parser (~> 2.1.3)
34
- powerpack (~> 0.0.6)
35
- rainbow (~> 1.99.1)
36
- slop (3.5.0)
37
- thor (0.19.1)
38
-
39
- PLATFORMS
40
- ruby
41
-
42
- DEPENDENCIES
43
- appraisal (~> 1.0.0)
44
- bundler (~> 1.3)
45
- rake (~> 10.1)
46
- rspec (~> 2.14.0)
47
- rubocop (= 0.17.0)
48
- rubocop-checkstyle_formatter!
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rubocop", "0.18.1"
6
-
7
- gemspec :path => "../"
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rubocop", "0.19.1"
6
-
7
- gemspec :path => "../"