rubocop-config-captive 1.16.1 → 1.16.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/config/__private__/rubocop-rspec.yml +2 -2
- data/config/rubocop-rails.yml +15 -0
- data/lib/rubocop/captive/version.rb +1 -1
- data/lib/rubocop/cop/captive/active_admin/active_admin_addons_presence.rb +1 -1
- data/lib/rubocop/cop/captive/no_app_env.rb +1 -1
- data/lib/rubocop/cop/captive/rails/no_find_by_in_scope.rb +1 -1
- data/lib/rubocop/cop/captive/string_where_in_scope.rb +1 -1
- data/lib/rubocop/cop/captive/translation/devise_i18n_presence.rb +1 -1
- data/lib/rubocop/cop/captive/translation/kaminari_i18n_presence.rb +1 -1
- data/lib/rubocop/cop/captive/translation/rails_i18n_presence.rb +1 -1
- 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: 974aa4249ecaee7812fa74c5566c3578ee969c94dee2643710bc5b4b1071cf61
|
4
|
+
data.tar.gz: 50f1ac44286b70c25f09337c6abed36d958cdd85bf289f03249a25867515b074
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed2937e7d5a6c021244c73f42cf0645cc0339abc1dd789c96185761f97a13f4f2c6da844c8f5d42167f3367283b2ad1a36c179ee44ab145567bddff0e97a56a0
|
7
|
+
data.tar.gz: 7a5c331bf8187182a88899c8a363de07f5ffbed30907ed9ead34b207c0b730880d2445f4c22af6639d8956cd82e3c9457c8c4b464c5685373f9439841eb09883
|
@@ -87,10 +87,10 @@ RSpec/ExpectInHook:
|
|
87
87
|
RSpec/ExpectOutput:
|
88
88
|
Description: Checks for opportunities to use `expect { ... }.to output`.
|
89
89
|
Enabled: false
|
90
|
-
|
90
|
+
Rails/FilePath:
|
91
91
|
Description: 'Checks the file and folder naming of the spec file.'
|
92
92
|
Enabled: false
|
93
|
-
|
93
|
+
SupportedStyles:
|
94
94
|
RuboCop: rubocop
|
95
95
|
RSpec: rspec
|
96
96
|
RSpec/Focus:
|
data/config/rubocop-rails.yml
CHANGED
@@ -154,3 +154,18 @@ Rails/WhereNot:
|
|
154
154
|
|
155
155
|
Rails/WhereNotWithMultipleConditions:
|
156
156
|
Enabled: true
|
157
|
+
|
158
|
+
Rails/DangerousColumnNames: # new in 2.21
|
159
|
+
Enabled: true
|
160
|
+
Rails/EnumSyntax: # new in 2.26
|
161
|
+
Enabled: true
|
162
|
+
Rails/EnvLocal: # new in 2.22
|
163
|
+
Enabled: true
|
164
|
+
Rails/RedundantActiveRecordAllMethod: # new in 2.21
|
165
|
+
Enabled: true
|
166
|
+
Rails/ThreeStateBooleanColumn: # new in 2.19
|
167
|
+
Enabled: true
|
168
|
+
Rails/UnusedRenderContent: # new in 2.21
|
169
|
+
Enabled: true
|
170
|
+
Rails/WhereRange: # new in 2.25
|
171
|
+
Enabled: true
|
@@ -13,7 +13,7 @@ module RuboCop
|
|
13
13
|
# # good
|
14
14
|
# gem 'activeadmin'
|
15
15
|
# gem 'activeadmin_addons'
|
16
|
-
class ActiveAdminAddonsPresence < RuboCop::Cop::
|
16
|
+
class ActiveAdminAddonsPresence < RuboCop::Cop::Base
|
17
17
|
MSG = "The gem `activeadmin_addons` should be added to the Gemfile "\
|
18
18
|
"if `activeadmin` is present in Gemfile"
|
19
19
|
|
@@ -6,7 +6,7 @@ module RuboCop
|
|
6
6
|
# This cop checks for usages of the `APP_ENV` environment variable.
|
7
7
|
# Usage of `APP_ENV` is prohibited as it conflicts with standard Rails/Rack
|
8
8
|
# environment variable `RAILS_ENV` and may lead to unexpected results.
|
9
|
-
class NoAppEnv < RuboCop::Cop::
|
9
|
+
class NoAppEnv < RuboCop::Cop::Base
|
10
10
|
MSG = "Do not use `APP_ENV` environment variable as it conflicts with "\
|
11
11
|
"standard Rails/Rack environment variable `RAILS_ENV`."
|
12
12
|
|
@@ -7,7 +7,7 @@ module RuboCop
|
|
7
7
|
# Avoid using `find_by` in a scope. Use `where` to return a collection or define a class method if you need a single record.
|
8
8
|
#
|
9
9
|
# @see https://stackoverflow.com/questions/31329554/find-by-inside-a-scope-is-firing-2-queries
|
10
|
-
class NoFindByInScope < RuboCop::Cop::
|
10
|
+
class NoFindByInScope < RuboCop::Cop::Base
|
11
11
|
MSG = "Avoid using `find_by` in a scope. Use `where` to return \
|
12
12
|
a collection or define a class method if you need a single record."
|
13
13
|
|
@@ -17,7 +17,7 @@ module RuboCop
|
|
17
17
|
# date_after(Date.current)
|
18
18
|
#
|
19
19
|
# scope :date_after, ->(date) { where('date > ?', date) }
|
20
|
-
class StringWhereInScope < RuboCop::Cop::
|
20
|
+
class StringWhereInScope < RuboCop::Cop::Base
|
21
21
|
MSG = "The `where` method should be used in a scope in a model."
|
22
22
|
|
23
23
|
def_node_matcher :where_with_string?, <<~PATTERN
|
@@ -13,7 +13,7 @@ module RuboCop
|
|
13
13
|
# # good
|
14
14
|
# gem 'devise'
|
15
15
|
# gem 'devise-i18n'
|
16
|
-
class DeviseI18nPresence < RuboCop::Cop::
|
16
|
+
class DeviseI18nPresence < RuboCop::Cop::Base
|
17
17
|
MSG = "The gem `devise-i18n` should be added to the Gemfile "\
|
18
18
|
"if `devise` is present in Gemfile"
|
19
19
|
|
@@ -15,7 +15,7 @@ module RuboCop
|
|
15
15
|
# # good
|
16
16
|
# gem 'kaminari'
|
17
17
|
# gem 'kaminari-i18n'
|
18
|
-
class KaminariI18nPresence < RuboCop::Cop::
|
18
|
+
class KaminariI18nPresence < RuboCop::Cop::Base
|
19
19
|
MSG = "The gem `kaminari-i18n` should be added to the Gemfile "\
|
20
20
|
"if `kaminari` is present in Gemfile"
|
21
21
|
|
@@ -15,7 +15,7 @@ module RuboCop
|
|
15
15
|
# # good
|
16
16
|
# gem 'rails'
|
17
17
|
# gem 'rails-i18n'
|
18
|
-
class RailsI18nPresence < RuboCop::Cop::
|
18
|
+
class RailsI18nPresence < RuboCop::Cop::Base
|
19
19
|
MSG = "The gem `rails-i18n` should be added to the Gemfile "\
|
20
20
|
"if `rails` is present in Gemfile"
|
21
21
|
|