danger-packwerk 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/danger-packwerk/basic_reference_offense.rb +5 -4
- data/lib/danger-packwerk/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8ad610d58f87b5c05d4f55688a43be6fe566a24a987d29dbd43bc1397e42e2b
|
4
|
+
data.tar.gz: d3db9e2c065272e5d1a249b81edd5ab5b4ac253fd0281df5e8cc5f5fc4ce92a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d707148404ee53fa7ca6b7fceb595ed8e97a746e57b2f6b3ba93d6e7f8f7a435524c641c89884d3b5e243fb2f19f71119b17689429d77dd5a280efd4c212c854
|
7
|
+
data.tar.gz: 8927da7749c65108bc30cfa1790e2dd2eb620c38a3895c201fad152f72c420c76950a5b5ee3f6ba5329990cb2c339af2717ebd5fc19c604e412636526b9e3c00
|
@@ -81,10 +81,11 @@ module DangerPackwerk
|
|
81
81
|
_line, class_name_line_number = deprecated_references_yml_pathname.readlines.each_with_index.find do |line, _index|
|
82
82
|
# If you have a class `::MyClass`, then you can get a false match if another constant in the file
|
83
83
|
# is named `MyOtherClass::MyClassThing`. Therefore we include quotes in our match to ensure that we match
|
84
|
-
# the constant and only the constant.
|
85
|
-
#
|
86
|
-
|
87
|
-
|
84
|
+
# the constant and only the constant.
|
85
|
+
# Right now `packwerk` `deprecated_references.yml` files typically use double quotes, but sometimes folks linters change this to single quotes.
|
86
|
+
# To be defensive, we match against either.
|
87
|
+
class_name_with_quote_boundaries = /["|']#{violation.class_name}["|']:/
|
88
|
+
line.match?(class_name_with_quote_boundaries)
|
88
89
|
end
|
89
90
|
|
90
91
|
if class_name_line_number.nil?
|
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.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gusto Engineers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: danger-plugin-api
|