gl_rubocop 0.3.1 → 0.3.2
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/default.yml +4 -0
- data/lib/gl_rubocop/gl_cops/unique_identifier.rb +5 -1
- data/lib/gl_rubocop/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: c142a90b62896eea7a2ef83f59c565463529eb5eec02d5f7e3d1f5c892f7ae4e
|
|
4
|
+
data.tar.gz: 2539a4287220284a0b69200f3a86b42d213bec3f8950667560f34fe37ca7a389
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3d7b1e1bbea93e8fb6427c79d16636f6a58ba376ee233189bdd18351cc6597f3b71338163e5d23477c2566c3ac3c91f7086cf5db819c6f6de9f429261f2bd8d0
|
|
7
|
+
data.tar.gz: a2739ce3a9419792deb3e42362e8f8ae454b7551c64695ac92e6859075db7927a9fc83409c5f854d079d966e829d2fed3bea87ac18adb29a29bed55c9e8841d0
|
data/default.yml
CHANGED
|
@@ -66,6 +66,10 @@ GLCops/SidekiqInheritsFromSidekiqJob:
|
|
|
66
66
|
- "app/**/*_worker.rb"
|
|
67
67
|
- "app/**/*_job.rb"
|
|
68
68
|
|
|
69
|
+
GLCops/TailwindNoContradictingClassName:
|
|
70
|
+
# Disabling the tailwind no contradicting class name for some fixes
|
|
71
|
+
Enabled: false
|
|
72
|
+
|
|
69
73
|
GLCops/UniqueIdentifier:
|
|
70
74
|
Enabled: true
|
|
71
75
|
Include:
|
|
@@ -15,7 +15,7 @@ module GLRubocop
|
|
|
15
15
|
UNIQUE_IDENTIFIER = 'data-test-id='.freeze
|
|
16
16
|
|
|
17
17
|
def on_send(node)
|
|
18
|
-
return unless file_exists? && valid_method_name?(node)
|
|
18
|
+
return unless file_exists? && valid_file_name? && valid_method_name?(node)
|
|
19
19
|
|
|
20
20
|
return add_offense(node) unless raw_content.include?(UNIQUE_IDENTIFIER)
|
|
21
21
|
|
|
@@ -28,6 +28,10 @@ module GLRubocop
|
|
|
28
28
|
File.exist?(processed_source.file_path)
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
+
def valid_file_name?
|
|
32
|
+
File.basename(processed_source.file_path) == 'component.html.erb'
|
|
33
|
+
end
|
|
34
|
+
|
|
31
35
|
def identifiable_line
|
|
32
36
|
line_number = raw_content.lines.find_index { |line| line.include?(UNIQUE_IDENTIFIER) }
|
|
33
37
|
raw_content.lines[line_number]
|
data/lib/gl_rubocop/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gl_rubocop
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Give Lively
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-11-
|
|
11
|
+
date: 2025-11-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rubocop
|