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.
- checksums.yaml +4 -4
- data/.github/workflows/publish.yml +35 -0
- data/.github/workflows/test.yml +24 -0
- data/.rubocop.yml +4777 -99
- data/Gemfile.lock +83 -63
- data/LICENSE +21 -0
- data/README.md +34 -21
- data/danger-pmd.gemspec +24 -22
- data/lib/danger_plugin.rb +1 -1
- data/lib/danger_pmd.rb +1 -1
- data/lib/pmd/{pmd_file.rb → entity/pmd_file.rb} +10 -13
- data/lib/pmd/{pmd_violation.rb → entity/pmd_violation.rb} +5 -4
- data/lib/pmd/gem_version.rb +1 -1
- data/lib/pmd/plugin.rb +35 -32
- data/spec/entity/pmd_file_spec.rb +48 -0
- data/spec/pmd_spec.rb +58 -64
- data/spec/spec_helper.rb +18 -18
- metadata +62 -31
- data/.travis.yml +0 -10
- data/LICENSE.txt +0 -22
data/spec/spec_helper.rb
CHANGED
@@ -1,30 +1,30 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
4
|
-
ROOT = Pathname.new(File.expand_path(
|
5
|
-
|
6
|
-
|
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
|
9
|
-
require
|
8
|
+
require 'bundler/setup'
|
9
|
+
require 'pry'
|
10
10
|
|
11
|
-
require
|
12
|
-
require
|
11
|
+
require 'rspec'
|
12
|
+
require 'danger'
|
13
13
|
|
14
|
-
if `git remote -v` ==
|
15
|
-
puts
|
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
|
22
|
+
config.filter_gems_from_backtrace 'bundler'
|
23
23
|
config.color = true
|
24
24
|
config.tty = true
|
25
25
|
end
|
26
26
|
|
27
|
-
require
|
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
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
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
|
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:
|
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.
|
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.
|
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: '
|
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: '
|
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: '
|
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: '
|
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:
|
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:
|
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:
|
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:
|
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.
|
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.
|
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:
|
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:
|
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:
|
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:
|
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.
|
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.
|
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:
|
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:
|
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
|
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
|
-
-
|
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.
|
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
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.
|