danger-pmd 0.2.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/spec/spec_helper.rb CHANGED
@@ -1,30 +1,30 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "pathname"
4
- ROOT = Pathname.new(File.expand_path("..", __dir__))
5
- $:.unshift((ROOT + "lib").to_s)
6
- $:.unshift((ROOT + "spec").to_s)
3
+ require 'pathname'
4
+ ROOT = Pathname.new(File.expand_path('..', __dir__))
5
+ $LOAD_PATH.unshift("#{ROOT}lib".to_s)
6
+ $LOAD_PATH.unshift("#{ROOT}spec".to_s)
7
7
 
8
- require "bundler/setup"
9
- require "pry"
8
+ require 'bundler/setup'
9
+ require 'pry'
10
10
 
11
- require "rspec"
12
- require "danger"
11
+ require 'rspec'
12
+ require 'danger'
13
13
 
14
- if `git remote -v` == ""
15
- puts "You cannot run tests without setting a local git remote on this repo"
14
+ if `git remote -v` == ''
15
+ puts 'You cannot run tests without setting a local git remote on this repo'
16
16
  puts "It's a weird side-effect of Danger's internals."
17
17
  exit(0)
18
18
  end
19
19
 
20
20
  # Use coloured output, it's the best.
21
21
  RSpec.configure do |config|
22
- config.filter_gems_from_backtrace "bundler"
22
+ config.filter_gems_from_backtrace 'bundler'
23
23
  config.color = true
24
24
  config.tty = true
25
25
  end
26
26
 
27
- require "danger_plugin"
27
+ require 'danger_plugin'
28
28
 
29
29
  # These functions are a subset of https://github.com/danger/danger/blob/master/spec/spec_helper.rb
30
30
  # If you are expanding these files, see if it's already been done ^.
@@ -42,7 +42,7 @@ def testing_ui
42
42
 
43
43
  cork = Cork::Board.new(out: @output)
44
44
  def cork.string
45
- out.string.gsub(/\e\[([;\d]+)?m/, "")
45
+ out.string.gsub(/\e\[([;\d]+)?m/, '')
46
46
  end
47
47
  cork
48
48
  end
@@ -52,11 +52,11 @@ end
52
52
  # running a PR on TravisCI
53
53
  def testing_env
54
54
  {
55
- "HAS_JOSH_K_SEAL_OF_APPROVAL" => "true",
56
- "TRAVIS_PULL_REQUEST" => "800",
57
- "TRAVIS_REPO_SLUG" => "artsy/eigen",
58
- "TRAVIS_COMMIT_RANGE" => "759adcbd0d8f...13c4dc8bb61d",
59
- "DANGER_GITHUB_API_TOKEN" => "123sbdq54erfsd3422gdfio"
55
+ 'HAS_JOSH_K_SEAL_OF_APPROVAL' => 'true',
56
+ 'TRAVIS_PULL_REQUEST' => '800',
57
+ 'TRAVIS_REPO_SLUG' => 'artsy/eigen',
58
+ 'TRAVIS_COMMIT_RANGE' => '759adcbd0d8f...13c4dc8bb61d',
59
+ 'DANGER_GITHUB_API_TOKEN' => '123sbdq54erfsd3422gdfio'
60
60
  }
61
61
  end
62
62
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger-pmd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mathieu Rul
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-30 00:00:00.000000000 Z
11
+ date: 2021-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: danger-plugin-api
@@ -30,140 +30,168 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '2.10'
33
+ version: '2.15'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '2.10'
40
+ version: '2.15'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.3'
47
+ version: '2.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '1.3'
54
+ version: '2.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '10.0'
61
+ version: '13.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '10.0'
68
+ version: '13.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '3.4'
75
+ version: 3.10.0
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '3.4'
82
+ version: 3.10.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rubocop
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0.75'
89
+ version: 1.11.0
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0.75'
96
+ version: 1.11.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: rubocop-rake
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 0.5.1
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 0.5.1
111
+ - !ruby/object:Gem::Dependency
112
+ name: rubocop-rspec
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 2.2.0
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 2.2.0
97
125
  - !ruby/object:Gem::Dependency
98
126
  name: yard
99
127
  requirement: !ruby/object:Gem::Requirement
100
128
  requirements:
101
129
  - - "~>"
102
130
  - !ruby/object:Gem::Version
103
- version: 0.9.20
131
+ version: 0.9.26
104
132
  type: :development
105
133
  prerelease: false
106
134
  version_requirements: !ruby/object:Gem::Requirement
107
135
  requirements:
108
136
  - - "~>"
109
137
  - !ruby/object:Gem::Version
110
- version: 0.9.20
138
+ version: 0.9.26
111
139
  - !ruby/object:Gem::Dependency
112
140
  name: guard
113
141
  requirement: !ruby/object:Gem::Requirement
114
142
  requirements:
115
143
  - - "~>"
116
144
  - !ruby/object:Gem::Version
117
- version: '2.14'
145
+ version: 2.16.2
118
146
  type: :development
119
147
  prerelease: false
120
148
  version_requirements: !ruby/object:Gem::Requirement
121
149
  requirements:
122
150
  - - "~>"
123
151
  - !ruby/object:Gem::Version
124
- version: '2.14'
152
+ version: 2.16.2
125
153
  - !ruby/object:Gem::Dependency
126
154
  name: guard-rspec
127
155
  requirement: !ruby/object:Gem::Requirement
128
156
  requirements:
129
157
  - - "~>"
130
158
  - !ruby/object:Gem::Version
131
- version: '4.7'
159
+ version: 4.7.3
132
160
  type: :development
133
161
  prerelease: false
134
162
  version_requirements: !ruby/object:Gem::Requirement
135
163
  requirements:
136
164
  - - "~>"
137
165
  - !ruby/object:Gem::Version
138
- version: '4.7'
166
+ version: 4.7.3
139
167
  - !ruby/object:Gem::Dependency
140
168
  name: listen
141
169
  requirement: !ruby/object:Gem::Requirement
142
170
  requirements:
143
- - - '='
171
+ - - "~>"
144
172
  - !ruby/object:Gem::Version
145
- version: 3.0.7
173
+ version: 3.0.8
146
174
  type: :development
147
175
  prerelease: false
148
176
  version_requirements: !ruby/object:Gem::Requirement
149
177
  requirements:
150
- - - '='
178
+ - - "~>"
151
179
  - !ruby/object:Gem::Version
152
- version: 3.0.7
180
+ version: 3.0.8
153
181
  - !ruby/object:Gem::Dependency
154
182
  name: pry
155
183
  requirement: !ruby/object:Gem::Requirement
156
184
  requirements:
157
- - - ">="
185
+ - - "~>"
158
186
  - !ruby/object:Gem::Version
159
- version: '0'
187
+ version: 0.14.0
160
188
  type: :development
161
189
  prerelease: false
162
190
  version_requirements: !ruby/object:Gem::Requirement
163
191
  requirements:
164
- - - ">="
192
+ - - "~>"
165
193
  - !ruby/object:Gem::Version
166
- version: '0'
194
+ version: 0.14.0
167
195
  description: A Danger plugin for PMD.
168
196
  email:
169
197
  - mathroule@gmail.com
@@ -171,22 +199,24 @@ executables: []
171
199
  extensions: []
172
200
  extra_rdoc_files: []
173
201
  files:
202
+ - ".github/workflows/publish.yml"
203
+ - ".github/workflows/test.yml"
174
204
  - ".gitignore"
175
205
  - ".rubocop.yml"
176
- - ".travis.yml"
177
206
  - Gemfile
178
207
  - Gemfile.lock
179
208
  - Guardfile
180
- - LICENSE.txt
209
+ - LICENSE
181
210
  - README.md
182
211
  - Rakefile
183
212
  - danger-pmd.gemspec
184
213
  - lib/danger_plugin.rb
185
214
  - lib/danger_pmd.rb
215
+ - lib/pmd/entity/pmd_file.rb
216
+ - lib/pmd/entity/pmd_violation.rb
186
217
  - lib/pmd/gem_version.rb
187
218
  - lib/pmd/plugin.rb
188
- - lib/pmd/pmd_file.rb
189
- - lib/pmd/pmd_violation.rb
219
+ - spec/entity/pmd_file_spec.rb
190
220
  - spec/fixtures/pmd_report.xml
191
221
  - spec/fixtures/report_1/pmd_sub_report.xml
192
222
  - spec/fixtures/report_2/pmd_sub_report.xml
@@ -211,11 +241,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
211
241
  - !ruby/object:Gem::Version
212
242
  version: '0'
213
243
  requirements: []
214
- rubygems_version: 3.0.6
244
+ rubygems_version: 3.2.3
215
245
  signing_key:
216
246
  specification_version: 4
217
247
  summary: A Danger plugin for PMD (Programming Mistake Detector), see https://pmd.github.io.
218
248
  test_files:
249
+ - spec/entity/pmd_file_spec.rb
219
250
  - spec/fixtures/pmd_report.xml
220
251
  - spec/fixtures/report_1/pmd_sub_report.xml
221
252
  - spec/fixtures/report_2/pmd_sub_report.xml
data/.travis.yml DELETED
@@ -1,10 +0,0 @@
1
- language: ruby
2
- cache:
3
- directories:
4
- - bundle
5
-
6
- rvm:
7
- - 2.3.8
8
-
9
- script:
10
- - bundle exec rake spec
data/LICENSE.txt DELETED
@@ -1,22 +0,0 @@
1
- Copyright (c) 2019 Mathieu Rul <mathroule@gmail.com>
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.