fablicop 1.0.3 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 918a60fe667d7c27167b11bae0add122cac9929c
4
- data.tar.gz: a0305aaaaa05c46b0e0c0f47cb32bdb83784cf2c
2
+ SHA256:
3
+ metadata.gz: ea27b444e39bc36b38a92d397f0d04340de44d4152f32bdd0a589e2928de0bb7
4
+ data.tar.gz: 963705e1dc93606803c70c571904ae87cae79e100c8d16c60b26444af2689170
5
5
  SHA512:
6
- metadata.gz: b1627367aec646bf71af683cc15046ffde6a737855f610aaf26678e230b36db469b81979b3e5d6805d60a9878b3b0813b69a0c94b8441a99c2a21b4cab859ba2
7
- data.tar.gz: 3dd625e93a7149b54e6792d4bece5c36b24c7759b911aa4154809bb3193842d255a82eefd11915455e7ef681328d05119734be3314a30eab99db85b32a90b167
6
+ metadata.gz: 7537521cadc4eb33bd237009f2d191688914006f6b71baafaafe27f7ed3411502e613e7696709a895ef144ee518d9e64fafea193718f1f28ce5a959940b53a14
7
+ data.tar.gz: 57bd65151b614a526133739152c679f3098cfef376e2eda81068553781d685edda9deb1277ede298185eb9436cf415f2dcfcf4b7ef806cb1c501a4548074d6c3
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.3.1
1
+ 2.5.5
data/README.md CHANGED
@@ -20,9 +20,6 @@ inherit_gem:
20
20
  # - "config/rails.yml"
21
21
  # uncomment if use rspec cops
22
22
  # - "config/rspec.yml"
23
-
24
- AllCops:
25
- TargetRubyVersion: 2.3
26
23
  ```
27
24
 
28
25
  ```sh
@@ -1,3 +1,6 @@
1
+ require:
2
+ - rubocop-rails
3
+
1
4
  # 自動生成されるものやテストデータはチェック対象から除外する
2
5
  AllCops:
3
6
  Exclude:
@@ -10,13 +13,29 @@ AllCops:
10
13
  - "spec/test_app/db/*"
11
14
 
12
15
  DisplayCopNames: true
13
- TargetRubyVersion: 2.3
16
+ NewCops: enable # 新しい規約も随時取り入れる
17
+
14
18
  Rails:
15
19
  Enabled: true
20
+
16
21
  # rails >= 5 の設定のため
17
22
  Rails/HttpPositionalArguments:
18
23
  Enabled: false
19
24
 
25
+ Rails/InverseOf:
26
+ Enabled: false
27
+
28
+ Rails/UnknownEnv:
29
+ Environments:
30
+ - production
31
+ - staging
32
+ - development
33
+ - local
34
+ - test
35
+
36
+ Gemspec/OrderedDependencies:
37
+ Enabled: false
38
+
20
39
  ##################### Style ##################################
21
40
 
22
41
  # 日本語のコメントを許可する
@@ -63,6 +82,62 @@ Style/MultilineBlockChain:
63
82
  Enabled: false
64
83
  Style/EmptyMethod:
65
84
  Enabled: false
85
+
86
+ # 候補が多いときはcondみたいに使いたい
87
+ Style/EmptyCaseCondition:
88
+ Enabled: false
89
+
90
+ Style/DoubleNegation:
91
+ Enabled: false
92
+
93
+ Style/ParallelAssignment:
94
+ Enabled: false
95
+
96
+ Style/BracesAroundHashParameters:
97
+ Enabled: false
98
+
99
+ Style/MethodCallWithoutArgsParentheses:
100
+ Enabled: false
101
+
102
+ Style/DefWithParentheses:
103
+ Enabled: false
104
+
105
+ # classが入れ子になった場合、テストの順番によってはエラーになりうる
106
+ Style/ClassAndModuleChildren:
107
+ Exclude:
108
+ - "test/**/*.rb"
109
+ - "spec/**/*.rb"
110
+
111
+ # 3桁ごとに_を入れるとSQLの表示方法と乖離するためfixtureは対象外
112
+ Style/NumericLiterals:
113
+ Exclude:
114
+ - "db/fixtures/*.rb"
115
+
116
+ # 候補が多いときはcondみたいに使いたい
117
+ Style/EmptyCaseCondition:
118
+ Enabled: false
119
+
120
+ Style/DoubleNegation:
121
+ Enabled: false
122
+
123
+ Style/ParallelAssignment:
124
+ Enabled: false
125
+
126
+ Style/MethodCallWithoutArgsParentheses:
127
+ Enabled: false
128
+
129
+ Style/DefWithParentheses:
130
+ Enabled: false
131
+
132
+ ##################### Layout ##################################
133
+ # 引数前のスペースは複数許可
134
+ Layout/SpaceBeforeFirstArg:
135
+ Enabled: false
136
+ Layout/SpaceInLambdaLiteral:
137
+ Enabled: false
138
+ Layout/IndentHeredoc:
139
+ Enabled: false
140
+
66
141
  # 引数の書き方の多様性を許可
67
142
  # foo(a,
68
143
  # b
@@ -104,25 +179,6 @@ Layout/MultilineMethodCallIndentation:
104
179
  Layout/FirstParameterIndentation:
105
180
  Enabled: false
106
181
 
107
- # 候補が多いときはcondみたいに使いたい
108
- Style/EmptyCaseCondition:
109
- Enabled: false
110
-
111
- Style/DoubleNegation:
112
- Enabled: false
113
-
114
- Style/ParallelAssignment:
115
- Enabled: false
116
-
117
- Style/BracesAroundHashParameters:
118
- Enabled: false
119
-
120
- Style/MethodCallWithoutArgsParentheses:
121
- Enabled: false
122
-
123
- Style/DefWithParentheses:
124
- Enabled: false
125
-
126
182
  # 以下の両方を許容
127
183
  # aaa.
128
184
  # bb().
@@ -135,25 +191,31 @@ Style/DefWithParentheses:
135
191
  Layout/DotPosition:
136
192
  Enabled: false
137
193
 
138
- # classが入れ子になった場合、テストの順番によってはエラーになりうる
139
- Style/ClassAndModuleChildren:
194
+ # fixtureファイルの1行 -> DBの1レコードとして記述している
195
+ # 複数行にまたがると直感的でなくなるため無効化
196
+ Layout/ClosingParenthesisIndentation:
140
197
  Exclude:
141
- - "test/**/*.rb"
142
- - "spec/**/*.rb"
198
+ - "db/fixtures/*.rb"
199
+ Layout/AlignParameters:
200
+ Exclude:
201
+ - "db/fixtures/*.rb"
143
202
 
144
- ##################### Layout ##################################
145
203
  # 引数前のスペースは複数許可
146
204
  Layout/SpaceBeforeFirstArg:
147
205
  Enabled: false
148
206
  Layout/SpaceInLambdaLiteral:
149
207
  Enabled: false
150
- Layout/IndentHeredoc:
151
- Enabled: false
152
- Layout/MultilineMethodCallBraceLayout:
153
- Enabled: false
154
- Layout/MultilineMethodCallIndentation:
208
+ Layout/HeredocIndentation:
155
209
  Enabled: false
156
210
 
211
+ # * 警告 120文字
212
+ # * 禁止 160文字
213
+ # のイメージ
214
+ Layout/LineLength:
215
+ Max: 160
216
+ Exclude:
217
+ - "db/migrate/*.rb"
218
+
157
219
  ##################### Lint ##################################
158
220
 
159
221
  # 引数前のスペースを許容する
@@ -162,14 +224,6 @@ Lint/ParenthesesAsGroupedExpression:
162
224
 
163
225
  ##################### Metrics ##################################
164
226
 
165
- # * 警告 120文字
166
- # * 禁止 160文字
167
- # のイメージ
168
- Metrics/LineLength:
169
- Max: 160
170
- Exclude:
171
- - "db/migrate/*.rb"
172
-
173
227
  # 20 行超えるのは migration ファイル以外滅多に無い
174
228
  Metrics/MethodLength:
175
229
  Max: 20
@@ -177,7 +231,7 @@ Metrics/MethodLength:
177
231
  - "db/migrate/*.rb"
178
232
 
179
233
  # キーワード引数は引数の数に含めない
180
- ParameterLists:
234
+ Metrics/ParameterLists:
181
235
  CountKeywordArgs: false
182
236
 
183
237
  Metrics/BlockLength:
@@ -188,16 +242,15 @@ Metrics/BlockLength:
188
242
  - "app/admin/*.rb"
189
243
  - "config/**/*.rb"
190
244
 
191
- # Explicitly set the default value 15
192
245
  Metrics/AbcSize:
193
- Max: 15
194
246
  Exclude:
195
247
  - "test/**/*.rb"
196
248
 
197
- # キーワード引数は引数の数に含めない
198
- ParameterLists:
199
- CountKeywordArgs: false
200
-
201
249
  Metrics/ClassLength:
202
250
  Exclude:
203
251
  - "test/**/*.rb"
252
+
253
+ # カラムが多い、もしくは文章が含まれるfixtureは一行が長くなってしまうため無効化
254
+ Metrics/LineLength:
255
+ Exclude:
256
+ - "db/fixtures/*.rb"
data/fablicop.gemspec CHANGED
@@ -30,8 +30,9 @@ Gem::Specification.new do |spec|
30
30
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
31
  spec.require_paths = ["lib"]
32
32
 
33
- spec.add_dependency "rubocop", "~> 0.53.0"
33
+ spec.add_dependency "rubocop", "~> 1.14.0"
34
34
  spec.add_dependency "rubocop-rspec", ">= 1.15.1"
35
+ spec.add_dependency "rubocop-rails"
35
36
  spec.add_development_dependency "bundler"
36
37
  spec.add_development_dependency "rake"
37
38
  end
@@ -1,3 +1,3 @@
1
1
  module Fablicop
2
- VERSION = '1.0.3'
2
+ VERSION = '1.0.8'
3
3
  end
@@ -5,6 +5,3 @@ inherit_gem:
5
5
  # - "config/rails.yml"
6
6
  # uncomment if use rspec cops
7
7
  # - "config/rspec.yml"
8
-
9
- AllCops:
10
- TargetRubyVersion: 2.3
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fablicop
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - tommy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2018-07-12 00:00:00.000000000 Z
13
+ date: 2021-06-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rubocop
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: 0.53.0
21
+ version: 1.14.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - "~>"
27
27
  - !ruby/object:Gem::Version
28
- version: 0.53.0
28
+ version: 1.14.0
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: rubocop-rspec
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -40,6 +40,20 @@ dependencies:
40
40
  - - ">="
41
41
  - !ruby/object:Gem::Version
42
42
  version: 1.15.1
43
+ - !ruby/object:Gem::Dependency
44
+ name: rubocop-rails
45
+ requirement: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: '0'
50
+ type: :runtime
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
43
57
  - !ruby/object:Gem::Dependency
44
58
  name: bundler
45
59
  requirement: !ruby/object:Gem::Requirement
@@ -115,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
129
  version: '0'
116
130
  requirements: []
117
131
  rubyforge_project:
118
- rubygems_version: 2.5.1
132
+ rubygems_version: 2.7.6.2
119
133
  signing_key:
120
134
  specification_version: 4
121
135
  summary: fablicop is a RuboCop configration gem.