rubocop-packs 0.0.9 → 0.0.10
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 +4 -4
- data/lib/rubocop/cop/packs/namespace_convention.rb +3 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3aa6a83103635cffaf57bbe3187211f14b0981633a55cf04cd73f6261df3d83a
|
|
4
|
+
data.tar.gz: 8816eab16fe3dd069a3327b8f1569e910ea07a012bb97bead1baf0f7f6cdfc66
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 37e828c802da1563049ce07a05e224187bfe8a3d61861f0cc05e774c311a3627d66d6ff116480d44100a9d31ef756bde1ea16777e02e5517e8f31fb0aab77595
|
|
7
|
+
data.tar.gz: 2e54cf17766e69bfd81663a488f1171a74335dd71c55fbfc55f9d1334f6eeae5d0b0fd5e7134349b42fb61c749520a760fd1902f0dfe19c457c311cba55f10ca
|
|
@@ -37,6 +37,9 @@ module RuboCop
|
|
|
37
37
|
|
|
38
38
|
relative_filename = relative_filepath.to_s
|
|
39
39
|
package_for_path = ParsePackwerk.package_from_path(relative_filename)
|
|
40
|
+
# If a pack is using automatic pack namespaces, this protection is a no-op since zeitwerk will enforce single namespaces in that case.
|
|
41
|
+
return if package_for_path.metadata['automatic_pack_namespace']
|
|
42
|
+
|
|
40
43
|
return if package_for_path.nil?
|
|
41
44
|
|
|
42
45
|
namespace_context = desired_zeitwerk_api.for_file(relative_filename, package_for_path)
|