rubocop-config-captive 1.0.0.pre.alpha.3 → 1.0.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/Gemfile +0 -4
- data/README.md +1 -1
- data/config/__private__/README.md +1 -0
- data/config/__private__/rubocop-airbnb.yml +96 -0
- data/config/__private__/rubocop-bundler.yml +9 -0
- data/config/__private__/rubocop-gemspec.yml +13 -0
- data/config/__private__/rubocop-layout.yml +562 -0
- data/config/__private__/rubocop-lint.yml +306 -0
- data/config/__private__/rubocop-metrics.yml +44 -0
- data/config/__private__/rubocop-naming.yml +89 -0
- data/config/__private__/rubocop-performance.yml +126 -0
- data/config/__private__/rubocop-rails.yml +222 -0
- data/config/__private__/rubocop-rspec.yml +327 -0
- data/config/__private__/rubocop-security.yml +18 -0
- data/config/__private__/rubocop-style.yml +1001 -0
- data/config/default.yml +54 -0
- data/config/rubocop-bundler.yml +3 -0
- data/config/rubocop-captive.yml +33 -0
- data/config/rubocop-capybara.yml +2 -0
- data/config/rubocop-gemspec.yml +3 -0
- data/config/rubocop-layout.yml +45 -0
- data/config/rubocop-lint.yml +3 -0
- data/config/rubocop-metrics.yml +3 -0
- data/config/rubocop-naming.yml +3 -0
- data/config/rubocop-performance.yml +3 -0
- data/config/rubocop-rails.yml +3 -0
- data/config/rubocop-rake.yml +2 -0
- data/config/rubocop-rspec.yml +3 -0
- data/config/rubocop-security.yml +3 -0
- data/config/rubocop-style.yml +3 -0
- data/lib/rubocop/captive/version.rb +8 -0
- data/lib/rubocop-captive.rb +1 -1
- data/rubocop-config-captive.gemspec +5 -2
- metadata +33 -4
data/config/default.yml
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
|
2
|
+
####
|
3
|
+
# Enable rails rules
|
4
|
+
####
|
5
|
+
Rails:
|
6
|
+
Enabled: true
|
7
|
+
|
8
|
+
####
|
9
|
+
# Global rules
|
10
|
+
####
|
11
|
+
AllCops:
|
12
|
+
NewCops: disable
|
13
|
+
Exclude:
|
14
|
+
- '.chefrepo/**/*'
|
15
|
+
- '.vagrant/**/*'
|
16
|
+
- '.git/**/*'
|
17
|
+
- '**/tmp/**/*'
|
18
|
+
- '**/templates/**/*'
|
19
|
+
- '**/vendor/**/*'
|
20
|
+
- '**/node_modules/**/*'
|
21
|
+
- 'tungsten/**/*'
|
22
|
+
- 'tungsten-support/**/*'
|
23
|
+
- Vagrantfile
|
24
|
+
- Guardfile
|
25
|
+
|
26
|
+
# Additional exclude files by rubocop-rails_config
|
27
|
+
# @see https://github.com/toshimaru/rubocop-rails_config/blob/main/config/rails.yml#L20
|
28
|
+
- 'bin/**/*'
|
29
|
+
- 'db/schema.rb'
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
# Enable new rules only if validated by Captive (or Airbnb via inherited_from)
|
34
|
+
DisabledByDefault: true
|
35
|
+
|
36
|
+
|
37
|
+
####
|
38
|
+
# Include every files
|
39
|
+
####
|
40
|
+
inherit_from:
|
41
|
+
- './rubocop-bundler.yml'
|
42
|
+
- './rubocop-capybara.yml'
|
43
|
+
- './rubocop-captive.yml'
|
44
|
+
- './rubocop-gemspec.yml'
|
45
|
+
- './rubocop-layout.yml'
|
46
|
+
- './rubocop-lint.yml'
|
47
|
+
- './rubocop-metrics.yml'
|
48
|
+
- './rubocop-naming.yml'
|
49
|
+
- './rubocop-performance.yml'
|
50
|
+
- './rubocop-rake.yml'
|
51
|
+
- './rubocop-rails.yml'
|
52
|
+
- './rubocop-rspec.yml'
|
53
|
+
- './rubocop-security.yml'
|
54
|
+
- './rubocop-style.yml'
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require:
|
2
|
+
- ../lib/rubocop/cop/captive/active_admin/active_admin_addons_presence.rb
|
3
|
+
- ../lib/rubocop/cop/captive/translation/devise_i18n_presence.rb
|
4
|
+
- ../lib/rubocop/cop/captive/translation/rails_i18n_presence.rb
|
5
|
+
- ../lib/rubocop/cop/captive/translation/kaminari_i18n_presence.rb
|
6
|
+
- ../lib/rubocop/cop/captive/string_where_in_scope.rb
|
7
|
+
|
8
|
+
# ActiveAdmin
|
9
|
+
Captive/ActiveAdmin/ActiveAdminAddonsPresence:
|
10
|
+
Description: 'The gem `activeadmin_addons` should be added to the Gemfile if `activeadmin` is present in Gemfile'
|
11
|
+
Include:
|
12
|
+
- 'Gemfile'
|
13
|
+
|
14
|
+
# Translation
|
15
|
+
Captive/Translation/DeviseI18nPresence:
|
16
|
+
Description: 'The gem `devise-i18n` should be added to the Gemfile if `devise` is present in Gemfile'
|
17
|
+
Include:
|
18
|
+
- 'Gemfile'
|
19
|
+
|
20
|
+
Captive/Translation/RailsI18nPresence:
|
21
|
+
Description: 'The gem `rails-i18n` should be added to the Gemfile if `rails` is present in Gemfile'
|
22
|
+
Include:
|
23
|
+
- 'Gemfile'
|
24
|
+
|
25
|
+
Captive/Translation/KaminariI18nPresence:
|
26
|
+
Description: 'The gem `kaminari-i18n` should be added to the Gemfile if `kaminari` is present in Gemfile'
|
27
|
+
Include:
|
28
|
+
- 'Gemfile'
|
29
|
+
|
30
|
+
Captive/StringWhereInScope:
|
31
|
+
Description: 'The `where` method should be used in a scope in a model.'
|
32
|
+
Exclude:
|
33
|
+
- 'app/models/**/*'
|
@@ -0,0 +1,45 @@
|
|
1
|
+
inherit_from:
|
2
|
+
# @see https://github.com/airbnb/ruby/blob/main/rubocop-airbnb/config/rubocop-layout.yml
|
3
|
+
- ./__private__/rubocop-layout.yml
|
4
|
+
|
5
|
+
Layout/DotPosition:
|
6
|
+
EnforcedStyle: leading
|
7
|
+
|
8
|
+
Layout/BlockAlignment:
|
9
|
+
Enabled: true
|
10
|
+
EnforcedStyleAlignWith: start_of_block
|
11
|
+
|
12
|
+
Layout/ArgumentAlignment:
|
13
|
+
Enabled: true
|
14
|
+
|
15
|
+
Layout/FirstMethodArgumentLineBreak:
|
16
|
+
Enabled: true
|
17
|
+
|
18
|
+
Layout/FirstMethodParameterLineBreak:
|
19
|
+
Enabled: true
|
20
|
+
|
21
|
+
Layout/HeredocArgumentClosingParenthesis:
|
22
|
+
Enabled: true
|
23
|
+
|
24
|
+
Layout/MultilineArrayLineBreaks:
|
25
|
+
Enabled: true
|
26
|
+
|
27
|
+
Layout/MultilineAssignmentLayout:
|
28
|
+
Enabled: true
|
29
|
+
|
30
|
+
Layout/MultilineHashKeyLineBreaks:
|
31
|
+
Enabled: true
|
32
|
+
|
33
|
+
Layout/MultilineMethodArgumentLineBreaks:
|
34
|
+
Enabled: true
|
35
|
+
|
36
|
+
Layout/MultilineOperationIndentation:
|
37
|
+
Enabled: true
|
38
|
+
EnforcedStyle: indented
|
39
|
+
|
40
|
+
Layout/MultilineMethodParameterLineBreaks:
|
41
|
+
Enabled: true
|
42
|
+
|
43
|
+
Layout/LineLength:
|
44
|
+
# Disable LineLength on comments
|
45
|
+
AllowedPatterns: ['^(\s*#)']
|
data/lib/rubocop-captive.rb
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
|
4
|
+
require 'rubocop/captive/version'
|
5
|
+
|
3
6
|
Gem::Specification.new do |gem|
|
4
7
|
gem.name = 'rubocop-config-captive'
|
5
|
-
gem.version =
|
8
|
+
gem.version = RuboCop::Captive::VERSION
|
6
9
|
gem.summary = 'Shared rubocop configurations'
|
7
10
|
gem.description = 'Shared rubocop configuration for Captive projects'
|
8
11
|
gem.authors = ['Captive', 'Julien Polo', "Clément Prod'homme"]
|
@@ -12,7 +15,7 @@ Gem::Specification.new do |gem|
|
|
12
15
|
gem.required_ruby_version = '>= 2.5'
|
13
16
|
|
14
17
|
gem.files = Dir[
|
15
|
-
'{
|
18
|
+
'{config,lib}/**/*',
|
16
19
|
'*.md',
|
17
20
|
'*.gemspec',
|
18
21
|
'Gemfile',
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-config-captive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Captive
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2023-04-
|
13
|
+
date: 2023-04-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rubocop
|
@@ -119,9 +119,38 @@ extra_rdoc_files: []
|
|
119
119
|
files:
|
120
120
|
- Gemfile
|
121
121
|
- README.md
|
122
|
+
- config/__private__/README.md
|
123
|
+
- config/__private__/rubocop-airbnb.yml
|
124
|
+
- config/__private__/rubocop-bundler.yml
|
125
|
+
- config/__private__/rubocop-gemspec.yml
|
126
|
+
- config/__private__/rubocop-layout.yml
|
127
|
+
- config/__private__/rubocop-lint.yml
|
128
|
+
- config/__private__/rubocop-metrics.yml
|
129
|
+
- config/__private__/rubocop-naming.yml
|
130
|
+
- config/__private__/rubocop-performance.yml
|
131
|
+
- config/__private__/rubocop-rails.yml
|
132
|
+
- config/__private__/rubocop-rspec.yml
|
133
|
+
- config/__private__/rubocop-security.yml
|
134
|
+
- config/__private__/rubocop-style.yml
|
135
|
+
- config/default.yml
|
136
|
+
- config/rubocop-bundler.yml
|
137
|
+
- config/rubocop-captive.yml
|
138
|
+
- config/rubocop-capybara.yml
|
139
|
+
- config/rubocop-gemspec.yml
|
140
|
+
- config/rubocop-layout.yml
|
141
|
+
- config/rubocop-lint.yml
|
142
|
+
- config/rubocop-metrics.yml
|
143
|
+
- config/rubocop-naming.yml
|
144
|
+
- config/rubocop-performance.yml
|
145
|
+
- config/rubocop-rails.yml
|
146
|
+
- config/rubocop-rake.yml
|
147
|
+
- config/rubocop-rspec.yml
|
148
|
+
- config/rubocop-security.yml
|
149
|
+
- config/rubocop-style.yml
|
122
150
|
- lib/rubocop-captive.rb
|
123
151
|
- lib/rubocop/captive.rb
|
124
152
|
- lib/rubocop/captive/inject.rb
|
153
|
+
- lib/rubocop/captive/version.rb
|
125
154
|
- lib/rubocop/cop/captive/active_admin/active_admin_addons_presence.rb
|
126
155
|
- lib/rubocop/cop/captive/string_where_in_scope.rb
|
127
156
|
- lib/rubocop/cop/captive/translation/devise_i18n_presence.rb
|
@@ -143,9 +172,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
143
172
|
version: '2.5'
|
144
173
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
145
174
|
requirements:
|
146
|
-
- - "
|
175
|
+
- - ">="
|
147
176
|
- !ruby/object:Gem::Version
|
148
|
-
version:
|
177
|
+
version: '0'
|
149
178
|
requirements: []
|
150
179
|
rubygems_version: 3.3.26
|
151
180
|
signing_key:
|