rubocop-migration 0.6.0 → 0.7.1
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/.rubocop.yml +3 -3
- data/Gemfile.lock +69 -64
- data/README.md +3 -3
- data/lib/rubocop/cop/migration/add_check_constraint.rb +1 -0
- data/lib/rubocop/cop/migration/add_column_with_default_value.rb +1 -0
- data/lib/rubocop/cop/migration/add_foreign_key.rb +1 -0
- data/lib/rubocop/cop/migration/add_index_columns_count.rb +1 -0
- data/lib/rubocop/cop/migration/add_index_concurrently.rb +1 -0
- data/lib/rubocop/cop/migration/add_index_duplicate.rb +2 -1
- data/lib/rubocop/cop/migration/batch_in_batches.rb +1 -0
- data/lib/rubocop/cop/migration/batch_in_transaction.rb +1 -0
- data/lib/rubocop/cop/migration/batch_with_throttling.rb +1 -0
- data/lib/rubocop/cop/migration/change_column.rb +1 -0
- data/lib/rubocop/cop/migration/change_column_null.rb +2 -1
- data/lib/rubocop/cop/migration/create_table_force.rb +1 -0
- data/lib/rubocop/cop/migration/jsonb.rb +1 -0
- data/lib/rubocop/cop/migration/remove_column.rb +13 -29
- data/lib/rubocop/cop/migration/rename_column.rb +1 -0
- data/lib/rubocop/cop/migration/rename_table.rb +1 -0
- data/lib/rubocop/cop/migration/reserved_word_mysql.rb +1 -0
- data/lib/rubocop/migration/plugin.rb +30 -0
- data/lib/rubocop/migration/version.rb +2 -2
- data/lib/rubocop/migration.rb +1 -1
- data/rubocop-migration.gemspec +5 -3
- metadata +22 -11
- data/lib/rubocop/migration/rubocop_extension.rb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21928f0fea19acf1ebaa7f52ce8959beb23971a5628cd22adca0247639a8a0c3
|
4
|
+
data.tar.gz: 54a78c51ce7b5067492e5c0c5ada239b0f70c6263357e6240d6e06135802bfcb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6e502ebe71d6da7432ac0a7c4e63ae3909a2c697b569d35142bcfb7c0dab53985c0eab0508824ec8beeb5b181048dbb43e07cee9278b14a445151bd9c2003ec
|
7
|
+
data.tar.gz: bcf97b0d4a3bd15992ee9cdb68b550f5d60d8eabcb1f44e683fd9306a70111f958380eefbcd43835b5c97a41cae91ed2e1d76ed3042a0aec6fdd7b63848b2c6c
|
data/.rubocop.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,103 +1,108 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rubocop-migration (0.
|
4
|
+
rubocop-migration (0.7.1)
|
5
5
|
activesupport
|
6
|
-
|
6
|
+
lint_roller (>= 1.1)
|
7
|
+
rubocop (>= 1.72.1)
|
7
8
|
rubocop-rails (>= 2.24)
|
8
9
|
|
9
10
|
GEM
|
10
11
|
remote: https://rubygems.org/
|
11
12
|
specs:
|
12
|
-
activesupport (7.1.
|
13
|
+
activesupport (7.1.5.1)
|
13
14
|
base64
|
15
|
+
benchmark (>= 0.3)
|
14
16
|
bigdecimal
|
15
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
16
18
|
connection_pool (>= 2.2.5)
|
17
19
|
drb
|
18
20
|
i18n (>= 1.6, < 2)
|
21
|
+
logger (>= 1.4.2)
|
19
22
|
minitest (>= 5.1)
|
20
23
|
mutex_m
|
24
|
+
securerandom (>= 0.3)
|
21
25
|
tzinfo (~> 2.0)
|
22
|
-
ast (2.4.
|
26
|
+
ast (2.4.3)
|
23
27
|
base64 (0.2.0)
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
i18n (1.14.
|
28
|
+
benchmark (0.4.0)
|
29
|
+
bigdecimal (3.1.9)
|
30
|
+
concurrent-ruby (1.3.5)
|
31
|
+
connection_pool (2.5.1)
|
32
|
+
diff-lcs (1.6.1)
|
33
|
+
drb (2.2.1)
|
34
|
+
i18n (1.14.7)
|
31
35
|
concurrent-ruby (~> 1.0)
|
32
|
-
json (2.
|
33
|
-
language_server-protocol (3.17.0.
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
36
|
+
json (2.10.2)
|
37
|
+
language_server-protocol (3.17.0.4)
|
38
|
+
lint_roller (1.1.0)
|
39
|
+
logger (1.7.0)
|
40
|
+
minitest (5.25.5)
|
41
|
+
mutex_m (0.3.0)
|
42
|
+
parallel (1.27.0)
|
43
|
+
parser (3.3.8.0)
|
38
44
|
ast (~> 2.4.1)
|
39
45
|
racc
|
40
|
-
|
41
|
-
|
46
|
+
prism (1.4.0)
|
47
|
+
racc (1.8.1)
|
48
|
+
rack (3.1.13)
|
42
49
|
rainbow (3.1.1)
|
43
|
-
rake (13.1
|
44
|
-
regexp_parser (2.
|
45
|
-
|
46
|
-
|
47
|
-
rspec-
|
48
|
-
rspec-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
rspec-expectations (3.12.3)
|
50
|
+
rake (13.2.1)
|
51
|
+
regexp_parser (2.10.0)
|
52
|
+
rspec (3.13.0)
|
53
|
+
rspec-core (~> 3.13.0)
|
54
|
+
rspec-expectations (~> 3.13.0)
|
55
|
+
rspec-mocks (~> 3.13.0)
|
56
|
+
rspec-core (3.13.3)
|
57
|
+
rspec-support (~> 3.13.0)
|
58
|
+
rspec-expectations (3.13.3)
|
53
59
|
diff-lcs (>= 1.2.0, < 2.0)
|
54
|
-
rspec-support (~> 3.
|
55
|
-
rspec-mocks (3.
|
60
|
+
rspec-support (~> 3.13.0)
|
61
|
+
rspec-mocks (3.13.2)
|
56
62
|
diff-lcs (>= 1.2.0, < 2.0)
|
57
|
-
rspec-support (~> 3.
|
58
|
-
rspec-support (3.
|
59
|
-
rubocop (1.
|
63
|
+
rspec-support (~> 3.13.0)
|
64
|
+
rspec-support (3.13.2)
|
65
|
+
rubocop (1.75.2)
|
60
66
|
json (~> 2.3)
|
61
|
-
language_server-protocol (
|
67
|
+
language_server-protocol (~> 3.17.0.2)
|
68
|
+
lint_roller (~> 1.1.0)
|
62
69
|
parallel (~> 1.10)
|
63
70
|
parser (>= 3.3.0.2)
|
64
71
|
rainbow (>= 2.2.2, < 4.0)
|
65
|
-
regexp_parser (>=
|
66
|
-
|
67
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
72
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
73
|
+
rubocop-ast (>= 1.44.0, < 2.0)
|
68
74
|
ruby-progressbar (~> 1.7)
|
69
|
-
unicode-display_width (>= 2.4.0, <
|
70
|
-
rubocop-ast (1.
|
71
|
-
parser (>= 3.3.
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
rubocop (
|
76
|
-
|
77
|
-
|
78
|
-
rubocop-ast (>= 1.30.0, < 2.0)
|
79
|
-
rubocop-rails (2.29.1)
|
75
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
76
|
+
rubocop-ast (1.44.1)
|
77
|
+
parser (>= 3.3.7.2)
|
78
|
+
prism (~> 1.4)
|
79
|
+
rubocop-performance (1.25.0)
|
80
|
+
lint_roller (~> 1.1)
|
81
|
+
rubocop (>= 1.75.0, < 2.0)
|
82
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
83
|
+
rubocop-rails (2.31.0)
|
80
84
|
activesupport (>= 4.2.0)
|
85
|
+
lint_roller (~> 1.1)
|
81
86
|
rack (>= 1.1)
|
82
|
-
rubocop (>= 1.
|
83
|
-
rubocop-ast (>= 1.
|
84
|
-
rubocop-rake (0.
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
rubocop
|
90
|
-
rubocop-rspec_rails (~> 2.28)
|
91
|
-
rubocop-rspec_rails (2.28.3)
|
92
|
-
rubocop (~> 1.40)
|
87
|
+
rubocop (>= 1.75.0, < 2.0)
|
88
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
89
|
+
rubocop-rake (0.7.1)
|
90
|
+
lint_roller (~> 1.1)
|
91
|
+
rubocop (>= 1.72.1)
|
92
|
+
rubocop-rspec (3.6.0)
|
93
|
+
lint_roller (~> 1.1)
|
94
|
+
rubocop (~> 1.72, >= 1.72.1)
|
93
95
|
ruby-progressbar (1.13.0)
|
94
|
-
|
95
|
-
sevencop (0.
|
96
|
+
securerandom (0.3.2)
|
97
|
+
sevencop (0.48.0)
|
96
98
|
activesupport
|
97
|
-
|
99
|
+
lint_roller (>= 1.1)
|
100
|
+
rubocop (>= 1.72.1)
|
98
101
|
tzinfo (2.0.6)
|
99
102
|
concurrent-ruby (~> 1.0)
|
100
|
-
unicode-display_width (
|
103
|
+
unicode-display_width (3.1.4)
|
104
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
105
|
+
unicode-emoji (4.0.4)
|
101
106
|
|
102
107
|
PLATFORMS
|
103
108
|
ruby
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
[](https://github.com/r7kamura/rubocop-migration/actions/workflows/ci.yml)
|
4
4
|
|
5
|
-
RuboCop
|
5
|
+
RuboCop plugin for ActiveRecord migration.
|
6
6
|
|
7
7
|
## Usage
|
8
8
|
|
@@ -13,11 +13,11 @@ Install `rubocop-migration` gem:
|
|
13
13
|
gem 'rubocop-migration', require: false
|
14
14
|
```
|
15
15
|
|
16
|
-
then
|
16
|
+
then add `rubocop-migration` to plugins section:
|
17
17
|
|
18
18
|
```yaml
|
19
19
|
# .rubocop.yml
|
20
|
-
|
20
|
+
plugins:
|
21
21
|
- rubocop-migration
|
22
22
|
|
23
23
|
Migration/AddCheckConstraint:
|
@@ -9,7 +9,7 @@ module RuboCop
|
|
9
9
|
# Avoid adding duplicate indexes.
|
10
10
|
#
|
11
11
|
# @safety
|
12
|
-
# This cop tries to find existing indexes from db/schema.rb, but it
|
12
|
+
# This cop tries to find existing indexes from db/schema.rb, but it cannot be found.
|
13
13
|
#
|
14
14
|
# @example
|
15
15
|
# # bad
|
@@ -39,6 +39,7 @@ module RuboCop
|
|
39
39
|
|
40
40
|
add_offense(node)
|
41
41
|
end
|
42
|
+
alias on_csend on_send
|
42
43
|
|
43
44
|
private
|
44
45
|
|
@@ -52,6 +52,7 @@ module RuboCop
|
|
52
52
|
autocorrect(corrector, node)
|
53
53
|
end
|
54
54
|
end
|
55
|
+
alias on_csend on_send
|
55
56
|
|
56
57
|
private
|
57
58
|
|
@@ -144,7 +145,7 @@ module RuboCop
|
|
144
145
|
node.first_argument.value.to_s
|
145
146
|
end
|
146
147
|
|
147
|
-
# @
|
148
|
+
# @param node [RuboCop::AST::SendNode]
|
148
149
|
# @return [String]
|
149
150
|
def find_table_name_from_change_column_null(node)
|
150
151
|
node.first_argument.value.to_s
|
@@ -51,6 +51,7 @@ module RuboCop
|
|
51
51
|
|
52
52
|
add_offense(node)
|
53
53
|
end
|
54
|
+
alias on_csend on_send
|
54
55
|
|
55
56
|
private
|
56
57
|
|
@@ -169,6 +170,7 @@ module RuboCop
|
|
169
170
|
)
|
170
171
|
Parser.call(
|
171
172
|
content: content,
|
173
|
+
parser_engine: respond_to?(:parser_engine) ? parser_engine : :parser_whitequark,
|
172
174
|
path: path,
|
173
175
|
target_ruby_version: target_ruby_version
|
174
176
|
)
|
@@ -183,16 +185,19 @@ module RuboCop
|
|
183
185
|
class Parser
|
184
186
|
class << self
|
185
187
|
# @param content [String]
|
188
|
+
# @param parser_engine [Symbol]
|
186
189
|
# @param path [String]
|
187
190
|
# @param target_ruby_version [#to_s]
|
188
191
|
# @return [RuboCop::AST::Node]
|
189
192
|
def call(
|
190
193
|
content:,
|
194
|
+
parser_engine:,
|
191
195
|
path:,
|
192
196
|
target_ruby_version:
|
193
197
|
)
|
194
198
|
new(
|
195
199
|
content: content,
|
200
|
+
parser_engine: parser_engine,
|
196
201
|
path: path,
|
197
202
|
target_ruby_version: target_ruby_version
|
198
203
|
).call
|
@@ -200,50 +205,29 @@ module RuboCop
|
|
200
205
|
end
|
201
206
|
|
202
207
|
# @param content [String]
|
208
|
+
# @param parser_engine [Symbol]
|
203
209
|
# @param path [String]
|
204
210
|
# @param target_ruby_version [#to_s]
|
205
211
|
def initialize(
|
206
212
|
content:,
|
213
|
+
parser_engine:,
|
207
214
|
path:,
|
208
215
|
target_ruby_version:
|
209
216
|
)
|
210
217
|
@content = content
|
218
|
+
@parser_engine = parser_engine
|
211
219
|
@path = path
|
212
220
|
@target_ruby_version = target_ruby_version
|
213
221
|
end
|
214
222
|
|
215
223
|
# @return [RuboCop::AST::Node]
|
216
224
|
def call
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
private
|
221
|
-
|
222
|
-
# @return [Parser::Source::Buffer]
|
223
|
-
def buffer
|
224
|
-
::Parser::Source::Buffer.new(
|
225
|
+
::RuboCop::ProcessedSource.new(
|
226
|
+
@content,
|
227
|
+
@target_ruby_version,
|
225
228
|
@path,
|
226
|
-
|
227
|
-
)
|
228
|
-
end
|
229
|
-
|
230
|
-
# @return [RuboCop::AST::Builder]
|
231
|
-
def builder
|
232
|
-
::RuboCop::AST::Builder.new
|
233
|
-
end
|
234
|
-
|
235
|
-
def parser
|
236
|
-
parser_class.new(builder)
|
237
|
-
end
|
238
|
-
|
239
|
-
# @return [Class]
|
240
|
-
def parser_class
|
241
|
-
::Parser.const_get(parser_class_name)
|
242
|
-
end
|
243
|
-
|
244
|
-
# @return [String]
|
245
|
-
def parser_class_name
|
246
|
-
"Ruby#{@target_ruby_version.to_s.delete('.')}"
|
229
|
+
parser_engine: @parser_engine
|
230
|
+
).ast
|
247
231
|
end
|
248
232
|
end
|
249
233
|
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'lint_roller'
|
4
|
+
|
5
|
+
module RuboCop
|
6
|
+
module Migration
|
7
|
+
class Plugin < ::LintRoller::Plugin
|
8
|
+
def about
|
9
|
+
::LintRoller::About.new(
|
10
|
+
description: 'RuboCop plugin for ActiveRecord migration.',
|
11
|
+
homepage: 'https://github.com/r7kamura/rubocop-migration',
|
12
|
+
name: 'rubocop-migration',
|
13
|
+
version: VERSION
|
14
|
+
)
|
15
|
+
end
|
16
|
+
|
17
|
+
def rules(_context)
|
18
|
+
::LintRoller::Rules.new(
|
19
|
+
config_format: :rubocop,
|
20
|
+
type: :path,
|
21
|
+
value: "#{__dir__}/../../../config/default.yml"
|
22
|
+
)
|
23
|
+
end
|
24
|
+
|
25
|
+
def supported?(context)
|
26
|
+
context.engine == :rubocop
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
data/lib/rubocop/migration.rb
CHANGED
data/rubocop-migration.gemspec
CHANGED
@@ -4,11 +4,11 @@ require_relative 'lib/rubocop/migration/version'
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'rubocop-migration'
|
7
|
-
spec.version =
|
7
|
+
spec.version = RuboCop::Migration::VERSION
|
8
8
|
spec.authors = ['Ryo Nakamura']
|
9
9
|
spec.email = ['r7kamura@gmail.com']
|
10
10
|
|
11
|
-
spec.summary = 'RuboCop
|
11
|
+
spec.summary = 'RuboCop plugin for ActiveRecord migration.'
|
12
12
|
spec.homepage = 'https://github.com/r7kamura/rubocop-migration'
|
13
13
|
spec.license = 'MIT'
|
14
14
|
spec.required_ruby_version = '>= 2.7'
|
@@ -16,6 +16,7 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.metadata['homepage_uri'] = spec.homepage
|
17
17
|
spec.metadata['source_code_uri'] = spec.homepage
|
18
18
|
spec.metadata['changelog_uri'] = "#{spec.homepage}/releases"
|
19
|
+
spec.metadata['default_lint_roller_plugin'] = 'RuboCop::Migration::Plugin'
|
19
20
|
|
20
21
|
spec.files = Dir.chdir(__dir__) do
|
21
22
|
`git ls-files -z`.split("\x0").reject do |f|
|
@@ -27,6 +28,7 @@ Gem::Specification.new do |spec|
|
|
27
28
|
spec.require_paths = ['lib']
|
28
29
|
|
29
30
|
spec.add_dependency 'activesupport'
|
30
|
-
spec.add_dependency '
|
31
|
+
spec.add_dependency 'lint_roller', '>= 1.1'
|
32
|
+
spec.add_dependency 'rubocop', '>= 1.72.1'
|
31
33
|
spec.add_dependency 'rubocop-rails', '>= 2.24'
|
32
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-migration
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: activesupport
|
@@ -24,20 +23,34 @@ dependencies:
|
|
24
23
|
- - ">="
|
25
24
|
- !ruby/object:Gem::Version
|
26
25
|
version: '0'
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: lint_roller
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '1.1'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '1.1'
|
27
40
|
- !ruby/object:Gem::Dependency
|
28
41
|
name: rubocop
|
29
42
|
requirement: !ruby/object:Gem::Requirement
|
30
43
|
requirements:
|
31
44
|
- - ">="
|
32
45
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
46
|
+
version: 1.72.1
|
34
47
|
type: :runtime
|
35
48
|
prerelease: false
|
36
49
|
version_requirements: !ruby/object:Gem::Requirement
|
37
50
|
requirements:
|
38
51
|
- - ">="
|
39
52
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
53
|
+
version: 1.72.1
|
41
54
|
- !ruby/object:Gem::Dependency
|
42
55
|
name: rubocop-rails
|
43
56
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,7 +65,6 @@ dependencies:
|
|
52
65
|
- - ">="
|
53
66
|
- !ruby/object:Gem::Version
|
54
67
|
version: '2.24'
|
55
|
-
description:
|
56
68
|
email:
|
57
69
|
- r7kamura@gmail.com
|
58
70
|
executables: []
|
@@ -92,7 +104,7 @@ files:
|
|
92
104
|
- lib/rubocop/migration/cop_concerns/batch_processing.rb
|
93
105
|
- lib/rubocop/migration/cop_concerns/column_type_method.rb
|
94
106
|
- lib/rubocop/migration/cop_concerns/disable_ddl_transaction.rb
|
95
|
-
- lib/rubocop/migration/
|
107
|
+
- lib/rubocop/migration/plugin.rb
|
96
108
|
- lib/rubocop/migration/version.rb
|
97
109
|
- rubocop-migration.gemspec
|
98
110
|
homepage: https://github.com/r7kamura/rubocop-migration
|
@@ -102,7 +114,7 @@ metadata:
|
|
102
114
|
homepage_uri: https://github.com/r7kamura/rubocop-migration
|
103
115
|
source_code_uri: https://github.com/r7kamura/rubocop-migration
|
104
116
|
changelog_uri: https://github.com/r7kamura/rubocop-migration/releases
|
105
|
-
|
117
|
+
default_lint_roller_plugin: RuboCop::Migration::Plugin
|
106
118
|
rdoc_options: []
|
107
119
|
require_paths:
|
108
120
|
- lib
|
@@ -117,8 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
129
|
- !ruby/object:Gem::Version
|
118
130
|
version: '0'
|
119
131
|
requirements: []
|
120
|
-
rubygems_version: 3.
|
121
|
-
signing_key:
|
132
|
+
rubygems_version: 3.6.7
|
122
133
|
specification_version: 4
|
123
|
-
summary: RuboCop
|
134
|
+
summary: RuboCop plugin for ActiveRecord migration.
|
124
135
|
test_files: []
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'rubocop'
|
4
|
-
|
5
|
-
require_relative 'config_loader'
|
6
|
-
|
7
|
-
RuboCop::ConfigLoader.instance_variable_set(
|
8
|
-
:@default_configuration,
|
9
|
-
RuboCop::Migration::ConfigLoader.call(
|
10
|
-
path: File.expand_path(
|
11
|
-
'../../../config/default.yml',
|
12
|
-
__dir__
|
13
|
-
)
|
14
|
-
)
|
15
|
-
)
|