sevencop 0.21.0 → 0.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +6 -0
- data/Gemfile.lock +13 -1
- data/README.md +17 -4
- data/config/default.yml +134 -0
- data/lib/rubocop/cop/sevencop/factory_bot_association_option.rb +1 -1
- data/lib/rubocop/cop/sevencop/factory_bot_association_style.rb +31 -31
- data/lib/rubocop/cop/sevencop/rails_inferred_spec_type.rb +1 -1
- data/lib/rubocop/cop/sevencop/rails_migration_add_check_constraint.rb +111 -0
- data/lib/rubocop/cop/sevencop/rails_migration_add_column_with_default_value.rb +229 -0
- data/lib/rubocop/cop/sevencop/rails_migration_add_foreign_key.rb +166 -0
- data/lib/rubocop/cop/sevencop/rails_migration_add_index_concurrently.rb +164 -0
- data/lib/rubocop/cop/sevencop/rails_migration_batch_in_batches.rb +95 -0
- data/lib/rubocop/cop/sevencop/rails_migration_batch_in_transaction.rb +83 -0
- data/lib/rubocop/cop/sevencop/rails_migration_batch_with_throttling.rb +108 -0
- data/lib/rubocop/cop/sevencop/rails_migration_change_column.rb +113 -0
- data/lib/rubocop/cop/sevencop/rails_migration_change_column_null.rb +128 -0
- data/lib/rubocop/cop/sevencop/rails_migration_create_table_force.rb +89 -0
- data/lib/rubocop/cop/sevencop/rails_migration_jsonb.rb +131 -0
- data/lib/rubocop/cop/sevencop/rails_migration_remove_column.rb +258 -0
- data/lib/rubocop/cop/sevencop/rails_migration_rename_column.rb +81 -0
- data/lib/rubocop/cop/sevencop/rails_migration_rename_table.rb +79 -0
- data/lib/rubocop/cop/sevencop/rails_migration_reserved_word_mysql.rb +2 -19
- data/lib/rubocop/cop/sevencop/rails_migration_unique_index_columns_count.rb +92 -0
- data/lib/sevencop/config_loader.rb +11 -10
- data/lib/sevencop/cop_concerns/batch_processing.rb +32 -0
- data/lib/sevencop/cop_concerns/column_type_method.rb +26 -0
- data/lib/sevencop/cop_concerns/disable_ddl_transaction.rb +49 -0
- data/lib/sevencop/cop_concerns.rb +3 -0
- data/lib/sevencop/rubocop_extension.rb +6 -1
- data/lib/sevencop/version.rb +1 -1
- data/lib/sevencop.rb +15 -0
- data/sevencop.gemspec +1 -0
- metadata +34 -2
@@ -2,6 +2,9 @@
|
|
2
2
|
|
3
3
|
module Sevencop
|
4
4
|
module CopConcerns
|
5
|
+
autoload :BatchProcessing, 'sevencop/cop_concerns/batch_processing'
|
6
|
+
autoload :ColumnTypeMethod, 'sevencop/cop_concerns/column_type_method'
|
7
|
+
autoload :DisableDdlTransaction, 'sevencop/cop_concerns/disable_ddl_transaction'
|
5
8
|
autoload :Ordered, 'sevencop/cop_concerns/ordered'
|
6
9
|
end
|
7
10
|
end
|
data/lib/sevencop/version.rb
CHANGED
data/lib/sevencop.rb
CHANGED
@@ -14,7 +14,22 @@ require_relative 'rubocop/cop/sevencop/method_definition_keyword_argument_ordere
|
|
14
14
|
require_relative 'rubocop/cop/sevencop/method_definition_ordered'
|
15
15
|
require_relative 'rubocop/cop/sevencop/rails_belongs_to_optional'
|
16
16
|
require_relative 'rubocop/cop/sevencop/rails_inferred_spec_type'
|
17
|
+
require_relative 'rubocop/cop/sevencop/rails_migration_add_check_constraint'
|
18
|
+
require_relative 'rubocop/cop/sevencop/rails_migration_add_column_with_default_value'
|
19
|
+
require_relative 'rubocop/cop/sevencop/rails_migration_add_foreign_key'
|
20
|
+
require_relative 'rubocop/cop/sevencop/rails_migration_add_index_concurrently'
|
21
|
+
require_relative 'rubocop/cop/sevencop/rails_migration_batch_in_batches'
|
22
|
+
require_relative 'rubocop/cop/sevencop/rails_migration_batch_in_transaction'
|
23
|
+
require_relative 'rubocop/cop/sevencop/rails_migration_batch_with_throttling'
|
24
|
+
require_relative 'rubocop/cop/sevencop/rails_migration_change_column'
|
25
|
+
require_relative 'rubocop/cop/sevencop/rails_migration_change_column_null'
|
26
|
+
require_relative 'rubocop/cop/sevencop/rails_migration_create_table_force'
|
27
|
+
require_relative 'rubocop/cop/sevencop/rails_migration_jsonb'
|
28
|
+
require_relative 'rubocop/cop/sevencop/rails_migration_remove_column'
|
29
|
+
require_relative 'rubocop/cop/sevencop/rails_migration_rename_column'
|
30
|
+
require_relative 'rubocop/cop/sevencop/rails_migration_rename_table'
|
17
31
|
require_relative 'rubocop/cop/sevencop/rails_migration_reserved_word_mysql'
|
32
|
+
require_relative 'rubocop/cop/sevencop/rails_migration_unique_index_columns_count'
|
18
33
|
require_relative 'rubocop/cop/sevencop/rails_order_field'
|
19
34
|
require_relative 'rubocop/cop/sevencop/rails_uniqueness_validator_explicit_case_sensitivity'
|
20
35
|
require_relative 'rubocop/cop/sevencop/rails_where_not'
|
data/sevencop.gemspec
CHANGED
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sevencop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.22.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: rubocop
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,7 +66,22 @@ files:
|
|
52
66
|
- lib/rubocop/cop/sevencop/method_definition_ordered.rb
|
53
67
|
- lib/rubocop/cop/sevencop/rails_belongs_to_optional.rb
|
54
68
|
- lib/rubocop/cop/sevencop/rails_inferred_spec_type.rb
|
69
|
+
- lib/rubocop/cop/sevencop/rails_migration_add_check_constraint.rb
|
70
|
+
- lib/rubocop/cop/sevencop/rails_migration_add_column_with_default_value.rb
|
71
|
+
- lib/rubocop/cop/sevencop/rails_migration_add_foreign_key.rb
|
72
|
+
- lib/rubocop/cop/sevencop/rails_migration_add_index_concurrently.rb
|
73
|
+
- lib/rubocop/cop/sevencop/rails_migration_batch_in_batches.rb
|
74
|
+
- lib/rubocop/cop/sevencop/rails_migration_batch_in_transaction.rb
|
75
|
+
- lib/rubocop/cop/sevencop/rails_migration_batch_with_throttling.rb
|
76
|
+
- lib/rubocop/cop/sevencop/rails_migration_change_column.rb
|
77
|
+
- lib/rubocop/cop/sevencop/rails_migration_change_column_null.rb
|
78
|
+
- lib/rubocop/cop/sevencop/rails_migration_create_table_force.rb
|
79
|
+
- lib/rubocop/cop/sevencop/rails_migration_jsonb.rb
|
80
|
+
- lib/rubocop/cop/sevencop/rails_migration_remove_column.rb
|
81
|
+
- lib/rubocop/cop/sevencop/rails_migration_rename_column.rb
|
82
|
+
- lib/rubocop/cop/sevencop/rails_migration_rename_table.rb
|
55
83
|
- lib/rubocop/cop/sevencop/rails_migration_reserved_word_mysql.rb
|
84
|
+
- lib/rubocop/cop/sevencop/rails_migration_unique_index_columns_count.rb
|
56
85
|
- lib/rubocop/cop/sevencop/rails_order_field.rb
|
57
86
|
- lib/rubocop/cop/sevencop/rails_uniqueness_validator_explicit_case_sensitivity.rb
|
58
87
|
- lib/rubocop/cop/sevencop/rails_where_not.rb
|
@@ -62,6 +91,9 @@ files:
|
|
62
91
|
- lib/sevencop.rb
|
63
92
|
- lib/sevencop/config_loader.rb
|
64
93
|
- lib/sevencop/cop_concerns.rb
|
94
|
+
- lib/sevencop/cop_concerns/batch_processing.rb
|
95
|
+
- lib/sevencop/cop_concerns/column_type_method.rb
|
96
|
+
- lib/sevencop/cop_concerns/disable_ddl_transaction.rb
|
65
97
|
- lib/sevencop/cop_concerns/ordered.rb
|
66
98
|
- lib/sevencop/rubocop_extension.rb
|
67
99
|
- lib/sevencop/version.rb
|