gl_rubocop 0.2.20 → 0.3.0
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 -3
- data/gl_rubocop.gemspec +2 -3
- data/lib/gl_rubocop/gl_cops/{prevent_erb_files.rb → prevent_haml_files.rb} +3 -3
- data/lib/gl_rubocop/version.rb +1 -1
- metadata +21 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cfa3a041b813576c82945878a3a5b712cddc171ee7e490a562c8186c8a078122
|
|
4
|
+
data.tar.gz: 59c4a3a19c71605f920bb21ca0b76ef965385e94836d8965b9735164cf227b7c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 240a0d83e8b317ef314783c0ff96c3f56cc1af17f144dda86d9048d791ecadb41d3408776831a5130ea8396467def9d65d524c778846539f32828565a742d2cc
|
|
7
|
+
data.tar.gz: d4870f2db16c75c7843df195c9a4f0a3b96e412ffedd20489368e7ad634a46933253ee56bd0f61f649edd35465b997d561d2f20618e8b1bcabae2977e7a1bcfe
|
data/default.yml
CHANGED
|
@@ -3,6 +3,7 @@ require:
|
|
|
3
3
|
- rubocop-rails
|
|
4
4
|
- rubocop-rspec
|
|
5
5
|
- rubocop-magic_numbers
|
|
6
|
+
- rubocop-erb
|
|
6
7
|
- rubocop-haml
|
|
7
8
|
- rubocop-i18n
|
|
8
9
|
- rubocop-rake
|
|
@@ -11,7 +12,7 @@ require:
|
|
|
11
12
|
- ./lib/gl_rubocop/gl_cops/interactor_inherits_from_interactor_base.rb
|
|
12
13
|
- ./lib/gl_rubocop/gl_cops/limit_flash_options.rb
|
|
13
14
|
- ./lib/gl_rubocop/gl_cops/no_stubbing_perform_async.rb
|
|
14
|
-
- ./lib/gl_rubocop/gl_cops/
|
|
15
|
+
- ./lib/gl_rubocop/gl_cops/prevent_haml_files.rb
|
|
15
16
|
- ./lib/gl_rubocop/gl_cops/rails_cache.rb
|
|
16
17
|
- ./lib/gl_rubocop/gl_cops/sidekiq_inherits_from_sidekiq_job.rb
|
|
17
18
|
- ./lib/gl_rubocop/gl_cops/unique_identifier.rb
|
|
@@ -54,7 +55,7 @@ GLCops/NoStubbingPerformAsync:
|
|
|
54
55
|
Include:
|
|
55
56
|
- "**/*spec.rb"
|
|
56
57
|
|
|
57
|
-
GLCops/
|
|
58
|
+
GLCops/PreventHamlFiles:
|
|
58
59
|
Enabled: true
|
|
59
60
|
|
|
60
61
|
GLCops/RailsCache:
|
|
@@ -68,7 +69,7 @@ GLCops/SidekiqInheritsFromSidekiqJob:
|
|
|
68
69
|
GLCops/UniqueIdentifier:
|
|
69
70
|
Enabled: true
|
|
70
71
|
Include:
|
|
71
|
-
- "app/components/**/*.
|
|
72
|
+
- "app/components/**/*.erb"
|
|
72
73
|
|
|
73
74
|
I18n/GetText:
|
|
74
75
|
Enabled: false
|
data/gl_rubocop.gemspec
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
require_relative 'lib/gl_rubocop/version'
|
|
4
4
|
|
|
5
|
-
NON_GEM_FILES = ['Gemfile', 'Gemfile.lock', 'Guardfile', 'bin/lint'].freeze
|
|
6
|
-
|
|
7
5
|
Gem::Specification.new do |spec|
|
|
8
6
|
spec.name = 'gl_rubocop'
|
|
9
7
|
spec.version = GLRubocop::VERSION
|
|
@@ -26,7 +24,8 @@ Gem::Specification.new do |spec|
|
|
|
26
24
|
spec.require_paths = ['lib']
|
|
27
25
|
|
|
28
26
|
spec.add_dependency 'rubocop', '~> 1.62.1'
|
|
29
|
-
spec.add_dependency 'rubocop-
|
|
27
|
+
spec.add_dependency 'rubocop-erb'
|
|
28
|
+
spec.add_dependency 'rubocop-haml'
|
|
30
29
|
spec.add_dependency 'rubocop-i18n'
|
|
31
30
|
spec.add_dependency 'rubocop-magic_numbers'
|
|
32
31
|
spec.add_dependency 'rubocop-performance'
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
module GLRubocop
|
|
2
2
|
module GLCops
|
|
3
|
-
class
|
|
4
|
-
MSG = 'File name should not end with .
|
|
3
|
+
class PreventHamlFiles < RuboCop::Cop::Cop
|
|
4
|
+
MSG = 'File name should not end with .haml'.freeze
|
|
5
5
|
|
|
6
6
|
def investigate(processed_source)
|
|
7
7
|
file_path = processed_source.buffer.name
|
|
8
|
-
return unless File.extname(file_path) == '.
|
|
8
|
+
return unless File.extname(file_path) == '.haml'
|
|
9
9
|
|
|
10
10
|
range = processed_source.buffer.source_range
|
|
11
11
|
add_offense(nil, location: range, message: MSG)
|
data/lib/gl_rubocop/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gl_rubocop
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Give Lively
|
|
@@ -24,20 +24,34 @@ dependencies:
|
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: 1.62.1
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: rubocop-erb
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - ">="
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '0'
|
|
34
|
+
type: :runtime
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - ">="
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '0'
|
|
27
41
|
- !ruby/object:Gem::Dependency
|
|
28
42
|
name: rubocop-haml
|
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
|
30
44
|
requirements:
|
|
31
|
-
- - "
|
|
45
|
+
- - ">="
|
|
32
46
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: 0
|
|
47
|
+
version: '0'
|
|
34
48
|
type: :runtime
|
|
35
49
|
prerelease: false
|
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
51
|
requirements:
|
|
38
|
-
- - "
|
|
52
|
+
- - ">="
|
|
39
53
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 0
|
|
54
|
+
version: '0'
|
|
41
55
|
- !ruby/object:Gem::Dependency
|
|
42
56
|
name: rubocop-i18n
|
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -152,7 +166,7 @@ files:
|
|
|
152
166
|
- lib/gl_rubocop/gl_cops/interactor_inherits_from_interactor_base.rb
|
|
153
167
|
- lib/gl_rubocop/gl_cops/limit_flash_options.rb
|
|
154
168
|
- lib/gl_rubocop/gl_cops/no_stubbing_perform_async.rb
|
|
155
|
-
- lib/gl_rubocop/gl_cops/
|
|
169
|
+
- lib/gl_rubocop/gl_cops/prevent_haml_files.rb
|
|
156
170
|
- lib/gl_rubocop/gl_cops/rails_cache.rb
|
|
157
171
|
- lib/gl_rubocop/gl_cops/sidekiq_inherits_from_sidekiq_job.rb
|
|
158
172
|
- lib/gl_rubocop/gl_cops/tailwind_no_contradicting_class_name.rb
|
|
@@ -180,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
180
194
|
- !ruby/object:Gem::Version
|
|
181
195
|
version: '0'
|
|
182
196
|
requirements: []
|
|
183
|
-
rubygems_version: 3.
|
|
197
|
+
rubygems_version: 3.4.19
|
|
184
198
|
signing_key:
|
|
185
199
|
specification_version: 4
|
|
186
200
|
summary: A shareable configuration of Give Lively's rubocop rules.
|