danger-packwerk 0.14.2 → 0.14.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9961bce735a4a3e2ffd6e2f67719059652d08bcadcd06c8ab349b27452137e5
|
4
|
+
data.tar.gz: 3eca02e4593c388f7170036cc78fde2b4efa4b2fe616b3d1591acb68ecffe610
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7167772693389751363dfd0c8e9956b30d7e2a237265d625f54de748453a3585a40b5e165e18bc6672d241344da08f216fd3614c031e9eea12b0e6eecca08c07
|
7
|
+
data.tar.gz: 0a8df0931b48669d9cb3d779824c6391622666c7614ca4fffa1cf03e83d1ba63ac891a7b621f736b1ddeeec0044694fc93c2ea15dbee4d633acd9cec52e1621c
|
@@ -88,8 +88,13 @@ module DangerPackwerk
|
|
88
88
|
# the constant and only the constant.
|
89
89
|
# Right now `packwerk` `package_todo.yml` files typically use double quotes, but sometimes folks linters change this to single quotes.
|
90
90
|
# To be defensive, we match against either.
|
91
|
-
|
92
|
-
|
91
|
+
|
92
|
+
patterns = [
|
93
|
+
/["|']#{violation.class_name}["|']:/,
|
94
|
+
/\? ["|']#{violation.class_name}["|']$/ # for keys that use explicit mapping syntax
|
95
|
+
]
|
96
|
+
|
97
|
+
patterns.any? { |p| line.match?(p) }
|
93
98
|
end
|
94
99
|
|
95
100
|
if class_name_line_number.nil?
|
@@ -20,9 +20,9 @@ module DangerPackwerk
|
|
20
20
|
BeforeComment = T.type_alias { T.proc.params(violation_diff: ViolationDiff, changed_package_todo_ymls: T::Array[String]).void }
|
21
21
|
DEFAULT_BEFORE_COMMENT = T.let(->(violation_diff, changed_package_todo_ymls) {}, BeforeComment)
|
22
22
|
DEFAULT_VIOLATION_TYPES = T.let([
|
23
|
-
|
24
|
-
|
25
|
-
|
23
|
+
DEPENDENCY_VIOLATION_TYPE,
|
24
|
+
PRIVACY_VIOLATION_TYPE
|
25
|
+
].freeze, T::Array[String])
|
26
26
|
|
27
27
|
sig do
|
28
28
|
params(
|
@@ -47,7 +47,7 @@ module DangerPackwerk
|
|
47
47
|
git_filesystem = Private::GitFilesystem.new(git: git, root: root_path || '')
|
48
48
|
changed_package_todo_ymls = (git_filesystem.modified_files + git_filesystem.added_files + git_filesystem.deleted_files).grep(PACKAGE_TODO_PATTERN)
|
49
49
|
|
50
|
-
violation_diff = get_violation_diff(violation_types, root_path: root_path)
|
50
|
+
violation_diff = DangerPackageTodoYmlChanges.get_violation_diff(violation_types, git: git, root_path: root_path)
|
51
51
|
|
52
52
|
before_comment.call(
|
53
53
|
violation_diff,
|
@@ -74,10 +74,11 @@ module DangerPackwerk
|
|
74
74
|
sig do
|
75
75
|
params(
|
76
76
|
violation_types: T::Array[String],
|
77
|
+
git: Danger::DangerfileGitPlugin,
|
77
78
|
root_path: T.nilable(String)
|
78
79
|
).returns(ViolationDiff)
|
79
80
|
end
|
80
|
-
def get_violation_diff(violation_types, root_path: nil)
|
81
|
+
def self.get_violation_diff(violation_types, git:, root_path: nil)
|
81
82
|
git_filesystem = Private::GitFilesystem.new(git: git, root: root_path || '')
|
82
83
|
|
83
84
|
added_violations, removed_violations = Private::TodoYmlChanges.get_reference_offenses(
|
@@ -23,9 +23,9 @@ module DangerPackwerk
|
|
23
23
|
DEFAULT_FAIL = false
|
24
24
|
DEFAULT_FAILURE_MESSAGE = 'Packwerk violations were detected! Please resolve them to unblock the build.'
|
25
25
|
DEFAULT_VIOLATION_TYPES = T.let([
|
26
|
-
|
27
|
-
|
28
|
-
|
26
|
+
DEPENDENCY_VIOLATION_TYPE,
|
27
|
+
PRIVACY_VIOLATION_TYPE
|
28
|
+
].freeze, T::Array[String])
|
29
29
|
|
30
30
|
class CommentGroupingStrategy < ::T::Enum
|
31
31
|
enums do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger-packwerk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gusto Engineers
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: code_ownership
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: packs
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: packwerk
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -140,30 +154,30 @@ dependencies:
|
|
140
154
|
name: rubocop
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
142
156
|
requirements:
|
143
|
-
- - "
|
157
|
+
- - "~>"
|
144
158
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
159
|
+
version: 1.26.0
|
146
160
|
type: :development
|
147
161
|
prerelease: false
|
148
162
|
version_requirements: !ruby/object:Gem::Requirement
|
149
163
|
requirements:
|
150
|
-
- - "
|
164
|
+
- - "~>"
|
151
165
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
166
|
+
version: 1.26.0
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
168
|
name: rubocop-sorbet
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
156
170
|
requirements:
|
157
|
-
- - "
|
171
|
+
- - "~>"
|
158
172
|
- !ruby/object:Gem::Version
|
159
|
-
version:
|
173
|
+
version: 0.6.0
|
160
174
|
type: :development
|
161
175
|
prerelease: false
|
162
176
|
version_requirements: !ruby/object:Gem::Requirement
|
163
177
|
requirements:
|
164
|
-
- - "
|
178
|
+
- - "~>"
|
165
179
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
180
|
+
version: 0.6.0
|
167
181
|
- !ruby/object:Gem::Dependency
|
168
182
|
name: sorbet
|
169
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -224,7 +238,7 @@ metadata:
|
|
224
238
|
source_code_uri: https://github.com/rubyatscale/danger-packwerk
|
225
239
|
changelog_uri: https://github.com/rubyatscale/danger-packwerk/releases
|
226
240
|
allowed_push_host: https://rubygems.org
|
227
|
-
post_install_message:
|
241
|
+
post_install_message:
|
228
242
|
rdoc_options: []
|
229
243
|
require_paths:
|
230
244
|
- lib
|
@@ -239,8 +253,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
239
253
|
- !ruby/object:Gem::Version
|
240
254
|
version: '0'
|
241
255
|
requirements: []
|
242
|
-
rubygems_version: 3.
|
243
|
-
signing_key:
|
256
|
+
rubygems_version: 3.5.9
|
257
|
+
signing_key:
|
244
258
|
specification_version: 4
|
245
259
|
summary: Danger plugin for packwerk.
|
246
260
|
test_files: []
|