rubocop-checkstyle_formatter 0.1.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/build.yml +20 -0
  3. data/.rubocop.yml +13 -0
  4. data/.rubocop_todo.yml +24 -0
  5. data/Appraisals +6 -10
  6. data/Gemfile +1 -0
  7. data/README.md +7 -7
  8. data/gemfiles/{rubocop_0.16.0.gemfile → rubocop_1.14.0.gemfile} +2 -2
  9. data/gemfiles/rubocop_1.14.0.gemfile.lock +64 -0
  10. data/gemfiles/{rubocop_0.14.1.gemfile → rubocop_1.15.0.gemfile} +2 -2
  11. data/gemfiles/rubocop_1.15.0.gemfile.lock +64 -0
  12. data/gemfiles/{rubocop_0.17.0.gemfile → rubocop_1.16.1.gemfile} +2 -2
  13. data/gemfiles/rubocop_1.16.1.gemfile.lock +64 -0
  14. data/gemfiles/{rubocop_0.15.0.gemfile → rubocop_1.17.0.gemfile} +2 -2
  15. data/gemfiles/rubocop_1.17.0.gemfile.lock +64 -0
  16. data/gemfiles/rubocop_1.18.4.gemfile +7 -0
  17. data/gemfiles/rubocop_1.18.4.gemfile.lock +64 -0
  18. data/gemfiles/rubocop_1.19.1.gemfile +7 -0
  19. data/gemfiles/rubocop_1.19.1.gemfile.lock +64 -0
  20. data/lib/rubocop/formatter/checkstyle_formatter.rb +19 -9
  21. data/rubocop-checkstyle_formatter.gemspec +12 -10
  22. data/spec/rubocop/formatter/checkstyle_formatter_spec.rb +36 -18
  23. data/spec/spec_helper.rb +1 -1
  24. metadata +43 -68
  25. data/.travis.yml +0 -38
  26. data/gemfiles/rubocop_0.14.1.gemfile.lock +0 -46
  27. data/gemfiles/rubocop_0.15.0.gemfile.lock +0 -46
  28. data/gemfiles/rubocop_0.16.0.gemfile.lock +0 -46
  29. data/gemfiles/rubocop_0.17.0.gemfile.lock +0 -48
  30. data/gemfiles/rubocop_0.18.1.gemfile +0 -7
  31. data/gemfiles/rubocop_0.18.1.gemfile.lock +0 -48
  32. data/gemfiles/rubocop_0.19.1.gemfile +0 -7
  33. data/gemfiles/rubocop_0.19.1.gemfile.lock +0 -50
  34. data/gemfiles/rubocop_0.20.1.gemfile +0 -7
  35. data/gemfiles/rubocop_0.20.1.gemfile.lock +0 -50
  36. data/gemfiles/rubocop_0.21.0.gemfile +0 -7
  37. data/gemfiles/rubocop_0.21.0.gemfile.lock +0 -50
  38. data/gemfiles/rubocop_0.22.0.gemfile +0 -7
  39. data/gemfiles/rubocop_0.22.0.gemfile.lock +0 -50
  40. data/gemfiles/rubocop_0.23.0.gemfile +0 -7
  41. data/gemfiles/rubocop_0.23.0.gemfile.lock +0 -50
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 34290eb428548f9e40dfa84c788d3fe0d656669760e10e9e0dcaff2346c8c86b
4
+ data.tar.gz: 293eec882f0223dea25a2b322ebf271547e4f8d79d03fb962954f487694728e2
5
+ SHA512:
6
+ metadata.gz: d528710683dd58a3db3882e3f81572ac854fcff735bdd32066e321ab955c4ebaae1f3503eb9f028f59eb298404a47ee43162f8efa651040a8240e9e9aa07c7b9
7
+ data.tar.gz: b02c1f60149578c2008dc218a5eaf005ae9c038d92d5f0a3ab34b5cb74413d53abf1c347ec0047118acb61360b4935ea805d44abb0bb1eca28e3fce4942fd9bd
@@ -0,0 +1,20 @@
1
+ name: Build Workflow
2
+ on: [push, pull_request]
3
+ jobs:
4
+ test:
5
+ strategy:
6
+ fail-fast: false
7
+ matrix:
8
+ ruby: ['2.5', '2.6', '2.7', '3.0', 'head', 'jruby-9.2.10.0']
9
+ gemfile: ['1.14.0', '1.15.0', '1.16.1', '1.17.0', '1.18.4', '1.19.1']
10
+ runs-on: ubuntu-latest
11
+ continue-on-error: ${{ matrix.ruby == 'head' }}
12
+ env:
13
+ BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rubocop_${{ matrix.gemfile }}.gemfile
14
+ steps:
15
+ - uses: actions/checkout@v2
16
+ - uses: ruby/setup-ruby@v1
17
+ with:
18
+ ruby-version: ${{ matrix.ruby }}
19
+ bundler-cache: true
20
+ - run: bundle exec rspec spec
data/.rubocop.yml ADDED
@@ -0,0 +1,13 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ AllCops:
4
+ DisplayCopNames: true
5
+ TargetRubyVersion: 2.2
6
+
7
+ Style/FrozenStringLiteralComment:
8
+ SupportedStyles:
9
+ - when_needed
10
+
11
+ Style/FileName:
12
+ Exclude:
13
+ - Appraisals
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,24 @@
1
+ # Offense count: 1
2
+ # Configuration parameters: CountComments, ExcludedMethods.
3
+ Metrics/BlockLength:
4
+ Max: 42
5
+
6
+ # Offense count: 9
7
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
8
+ # URISchemes: http, https
9
+ Metrics/LineLength:
10
+ Max: 111
11
+
12
+ # Offense count: 1
13
+ # Cop supports --auto-correct.
14
+ # Configuration parameters: Keywords.
15
+ # Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW
16
+ Style/CommentAnnotation:
17
+ Exclude:
18
+ - 'lib/rubocop/formatter/checkstyle_formatter.rb'
19
+
20
+ # Offense count: 2
21
+ # Cop supports --auto-correct.
22
+ Style/CommentIndentation:
23
+ Exclude:
24
+ - 'lib/rubocop/formatter/checkstyle_formatter.rb'
data/Appraisals CHANGED
@@ -1,14 +1,10 @@
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
- '0.20.1',
9
- '0.21.0',
10
- '0.22.0',
11
- '0.23.0'
2
+ '1.14.0',
3
+ '1.15.0',
4
+ '1.16.1',
5
+ '1.17.0',
6
+ '1.18.4',
7
+ '1.19.1'
12
8
  ].each do |version|
13
9
  appraise "rubocop-#{version}" do
14
10
  gem 'rubocop', version
data/Gemfile CHANGED
@@ -2,3 +2,4 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in rubocop_checkstyle.gemspec
4
4
  gemspec
5
+ gem 'rake' if RUBY_PLATFORM == 'java'
data/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # RuboCop Checkstyle Formatter
2
2
 
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.
3
+ A formatter for [RuboCop](https://github.com/rubocop/rubocop) that outputs in checkstyle format.
4
+ It requires RuboCop version 1.14.0 or above.
5
5
 
6
- [![Build Status](https://travis-ci.org/eitoball/rubocop-checkstyle_formatter.svg?branch=master)](https://travis-ci.org/eitoball/rubocop-checkstyle_formatter)
6
+ ![Build Status](https://github.com/eitoball/rubocop-checkstyle_formatter/actions/workflows/build.yml/badge.svg?branch=master)
7
7
 
8
8
  ## Installation
9
9
 
@@ -22,13 +22,13 @@ Or install it yourself as:
22
22
  ## Usage
23
23
 
24
24
  $ rubocop --require rubocop/formatter/checkstyle_formatter --format RuboCop::Formatter::CheckstyleFormatter
25
-
26
- I use this formatter in Jenkins with [Violations plugin](https://wiki.jenkins-ci.org/display/JENKINS/Violations).
25
+
26
+ I use this formatter in Jenkins with [Checkstyle plugin](https://wiki.jenkins-ci.org/display/JENKINS/Checkstyle+Plugin).
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
- Then, after build, I add 'Report Violations' and configure xml filename pattern of checkstyle to "tmp/checkstyle.xml".
31
+ Then, after build, I add post-build action 'Publish Checkstyle analysis results' and configure Checkstyle results to "tmp/checkstyle.xml".
32
32
 
33
33
  ## Contributing
34
34
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rubocop", "0.16.0"
5
+ gem "rubocop", "1.14.0"
6
6
 
7
- gemspec :path => "../"
7
+ gemspec path: "../"
@@ -0,0 +1,64 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ rubocop-checkstyle_formatter (0.5.0)
5
+ rubocop (>= 1.14.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ appraisal (2.4.1)
11
+ bundler
12
+ rake
13
+ thor (>= 0.14.0)
14
+ ast (2.4.2)
15
+ diff-lcs (1.4.4)
16
+ parallel (1.20.1)
17
+ parser (3.0.2.0)
18
+ ast (~> 2.4.1)
19
+ rainbow (3.0.0)
20
+ rake (13.0.6)
21
+ regexp_parser (2.1.1)
22
+ rexml (3.2.5)
23
+ rspec (3.5.0)
24
+ rspec-core (~> 3.5.0)
25
+ rspec-expectations (~> 3.5.0)
26
+ rspec-mocks (~> 3.5.0)
27
+ rspec-core (3.5.4)
28
+ rspec-support (~> 3.5.0)
29
+ rspec-expectations (3.5.0)
30
+ diff-lcs (>= 1.2.0, < 2.0)
31
+ rspec-support (~> 3.5.0)
32
+ rspec-mocks (3.5.0)
33
+ diff-lcs (>= 1.2.0, < 2.0)
34
+ rspec-support (~> 3.5.0)
35
+ rspec-support (3.5.0)
36
+ rubocop (1.14.0)
37
+ parallel (~> 1.10)
38
+ parser (>= 3.0.0.0)
39
+ rainbow (>= 2.2.2, < 4.0)
40
+ regexp_parser (>= 1.8, < 3.0)
41
+ rexml
42
+ rubocop-ast (>= 1.5.0, < 2.0)
43
+ ruby-progressbar (~> 1.7)
44
+ unicode-display_width (>= 1.4.0, < 3.0)
45
+ rubocop-ast (1.10.0)
46
+ parser (>= 3.0.1.1)
47
+ ruby-progressbar (1.11.0)
48
+ thor (1.1.0)
49
+ unicode-display_width (2.0.0)
50
+
51
+ PLATFORMS
52
+ java
53
+ ruby
54
+
55
+ DEPENDENCIES
56
+ appraisal (~> 2.4.1)
57
+ bundler (>= 2.2.10)
58
+ rake (>= 12.3.3)
59
+ rspec (~> 3.5.0)
60
+ rubocop (= 1.14.0)
61
+ rubocop-checkstyle_formatter!
62
+
63
+ BUNDLED WITH
64
+ 2.2.25
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rubocop", "0.14.1"
5
+ gem "rubocop", "1.15.0"
6
6
 
7
- gemspec :path => "../"
7
+ gemspec path: "../"
@@ -0,0 +1,64 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ rubocop-checkstyle_formatter (0.5.0)
5
+ rubocop (>= 1.14.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ appraisal (2.4.1)
11
+ bundler
12
+ rake
13
+ thor (>= 0.14.0)
14
+ ast (2.4.2)
15
+ diff-lcs (1.4.4)
16
+ parallel (1.20.1)
17
+ parser (3.0.2.0)
18
+ ast (~> 2.4.1)
19
+ rainbow (3.0.0)
20
+ rake (13.0.6)
21
+ regexp_parser (2.1.1)
22
+ rexml (3.2.5)
23
+ rspec (3.5.0)
24
+ rspec-core (~> 3.5.0)
25
+ rspec-expectations (~> 3.5.0)
26
+ rspec-mocks (~> 3.5.0)
27
+ rspec-core (3.5.4)
28
+ rspec-support (~> 3.5.0)
29
+ rspec-expectations (3.5.0)
30
+ diff-lcs (>= 1.2.0, < 2.0)
31
+ rspec-support (~> 3.5.0)
32
+ rspec-mocks (3.5.0)
33
+ diff-lcs (>= 1.2.0, < 2.0)
34
+ rspec-support (~> 3.5.0)
35
+ rspec-support (3.5.0)
36
+ rubocop (1.15.0)
37
+ parallel (~> 1.10)
38
+ parser (>= 3.0.0.0)
39
+ rainbow (>= 2.2.2, < 4.0)
40
+ regexp_parser (>= 1.8, < 3.0)
41
+ rexml
42
+ rubocop-ast (>= 1.5.0, < 2.0)
43
+ ruby-progressbar (~> 1.7)
44
+ unicode-display_width (>= 1.4.0, < 3.0)
45
+ rubocop-ast (1.10.0)
46
+ parser (>= 3.0.1.1)
47
+ ruby-progressbar (1.11.0)
48
+ thor (1.1.0)
49
+ unicode-display_width (2.0.0)
50
+
51
+ PLATFORMS
52
+ java
53
+ ruby
54
+
55
+ DEPENDENCIES
56
+ appraisal (~> 2.4.1)
57
+ bundler (>= 2.2.10)
58
+ rake (>= 12.3.3)
59
+ rspec (~> 3.5.0)
60
+ rubocop (= 1.15.0)
61
+ rubocop-checkstyle_formatter!
62
+
63
+ BUNDLED WITH
64
+ 2.2.25
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rubocop", "0.17.0"
5
+ gem "rubocop", "1.16.1"
6
6
 
7
- gemspec :path => "../"
7
+ gemspec path: "../"
@@ -0,0 +1,64 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ rubocop-checkstyle_formatter (0.5.0)
5
+ rubocop (>= 1.14.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ appraisal (2.4.1)
11
+ bundler
12
+ rake
13
+ thor (>= 0.14.0)
14
+ ast (2.4.2)
15
+ diff-lcs (1.4.4)
16
+ parallel (1.20.1)
17
+ parser (3.0.2.0)
18
+ ast (~> 2.4.1)
19
+ rainbow (3.0.0)
20
+ rake (13.0.6)
21
+ regexp_parser (2.1.1)
22
+ rexml (3.2.5)
23
+ rspec (3.5.0)
24
+ rspec-core (~> 3.5.0)
25
+ rspec-expectations (~> 3.5.0)
26
+ rspec-mocks (~> 3.5.0)
27
+ rspec-core (3.5.4)
28
+ rspec-support (~> 3.5.0)
29
+ rspec-expectations (3.5.0)
30
+ diff-lcs (>= 1.2.0, < 2.0)
31
+ rspec-support (~> 3.5.0)
32
+ rspec-mocks (3.5.0)
33
+ diff-lcs (>= 1.2.0, < 2.0)
34
+ rspec-support (~> 3.5.0)
35
+ rspec-support (3.5.0)
36
+ rubocop (1.16.1)
37
+ parallel (~> 1.10)
38
+ parser (>= 3.0.0.0)
39
+ rainbow (>= 2.2.2, < 4.0)
40
+ regexp_parser (>= 1.8, < 3.0)
41
+ rexml
42
+ rubocop-ast (>= 1.7.0, < 2.0)
43
+ ruby-progressbar (~> 1.7)
44
+ unicode-display_width (>= 1.4.0, < 3.0)
45
+ rubocop-ast (1.10.0)
46
+ parser (>= 3.0.1.1)
47
+ ruby-progressbar (1.11.0)
48
+ thor (1.1.0)
49
+ unicode-display_width (2.0.0)
50
+
51
+ PLATFORMS
52
+ java
53
+ ruby
54
+
55
+ DEPENDENCIES
56
+ appraisal (~> 2.4.1)
57
+ bundler (>= 2.2.10)
58
+ rake (>= 12.3.3)
59
+ rspec (~> 3.5.0)
60
+ rubocop (= 1.16.1)
61
+ rubocop-checkstyle_formatter!
62
+
63
+ BUNDLED WITH
64
+ 2.2.25
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rubocop", "0.15.0"
5
+ gem "rubocop", "1.17.0"
6
6
 
7
- gemspec :path => "../"
7
+ gemspec path: "../"
@@ -0,0 +1,64 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ rubocop-checkstyle_formatter (0.5.0)
5
+ rubocop (>= 1.14.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ appraisal (2.4.1)
11
+ bundler
12
+ rake
13
+ thor (>= 0.14.0)
14
+ ast (2.4.2)
15
+ diff-lcs (1.4.4)
16
+ parallel (1.20.1)
17
+ parser (3.0.2.0)
18
+ ast (~> 2.4.1)
19
+ rainbow (3.0.0)
20
+ rake (13.0.6)
21
+ regexp_parser (2.1.1)
22
+ rexml (3.2.5)
23
+ rspec (3.5.0)
24
+ rspec-core (~> 3.5.0)
25
+ rspec-expectations (~> 3.5.0)
26
+ rspec-mocks (~> 3.5.0)
27
+ rspec-core (3.5.4)
28
+ rspec-support (~> 3.5.0)
29
+ rspec-expectations (3.5.0)
30
+ diff-lcs (>= 1.2.0, < 2.0)
31
+ rspec-support (~> 3.5.0)
32
+ rspec-mocks (3.5.0)
33
+ diff-lcs (>= 1.2.0, < 2.0)
34
+ rspec-support (~> 3.5.0)
35
+ rspec-support (3.5.0)
36
+ rubocop (1.17.0)
37
+ parallel (~> 1.10)
38
+ parser (>= 3.0.0.0)
39
+ rainbow (>= 2.2.2, < 4.0)
40
+ regexp_parser (>= 1.8, < 3.0)
41
+ rexml
42
+ rubocop-ast (>= 1.7.0, < 2.0)
43
+ ruby-progressbar (~> 1.7)
44
+ unicode-display_width (>= 1.4.0, < 3.0)
45
+ rubocop-ast (1.10.0)
46
+ parser (>= 3.0.1.1)
47
+ ruby-progressbar (1.11.0)
48
+ thor (1.1.0)
49
+ unicode-display_width (2.0.0)
50
+
51
+ PLATFORMS
52
+ java
53
+ ruby
54
+
55
+ DEPENDENCIES
56
+ appraisal (~> 2.4.1)
57
+ bundler (>= 2.2.10)
58
+ rake (>= 12.3.3)
59
+ rspec (~> 3.5.0)
60
+ rubocop (= 1.17.0)
61
+ rubocop-checkstyle_formatter!
62
+
63
+ BUNDLED WITH
64
+ 2.2.25
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "1.18.4"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,64 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ rubocop-checkstyle_formatter (0.5.0)
5
+ rubocop (>= 1.14.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ appraisal (2.4.1)
11
+ bundler
12
+ rake
13
+ thor (>= 0.14.0)
14
+ ast (2.4.2)
15
+ diff-lcs (1.4.4)
16
+ parallel (1.20.1)
17
+ parser (3.0.2.0)
18
+ ast (~> 2.4.1)
19
+ rainbow (3.0.0)
20
+ rake (13.0.6)
21
+ regexp_parser (2.1.1)
22
+ rexml (3.2.5)
23
+ rspec (3.5.0)
24
+ rspec-core (~> 3.5.0)
25
+ rspec-expectations (~> 3.5.0)
26
+ rspec-mocks (~> 3.5.0)
27
+ rspec-core (3.5.4)
28
+ rspec-support (~> 3.5.0)
29
+ rspec-expectations (3.5.0)
30
+ diff-lcs (>= 1.2.0, < 2.0)
31
+ rspec-support (~> 3.5.0)
32
+ rspec-mocks (3.5.0)
33
+ diff-lcs (>= 1.2.0, < 2.0)
34
+ rspec-support (~> 3.5.0)
35
+ rspec-support (3.5.0)
36
+ rubocop (1.18.4)
37
+ parallel (~> 1.10)
38
+ parser (>= 3.0.0.0)
39
+ rainbow (>= 2.2.2, < 4.0)
40
+ regexp_parser (>= 1.8, < 3.0)
41
+ rexml
42
+ rubocop-ast (>= 1.8.0, < 2.0)
43
+ ruby-progressbar (~> 1.7)
44
+ unicode-display_width (>= 1.4.0, < 3.0)
45
+ rubocop-ast (1.10.0)
46
+ parser (>= 3.0.1.1)
47
+ ruby-progressbar (1.11.0)
48
+ thor (1.1.0)
49
+ unicode-display_width (2.0.0)
50
+
51
+ PLATFORMS
52
+ java
53
+ ruby
54
+
55
+ DEPENDENCIES
56
+ appraisal (~> 2.4.1)
57
+ bundler (>= 2.2.10)
58
+ rake (>= 12.3.3)
59
+ rspec (~> 3.5.0)
60
+ rubocop (= 1.18.4)
61
+ rubocop-checkstyle_formatter!
62
+
63
+ BUNDLED WITH
64
+ 2.2.25