forkwell_cop 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.ruby-version +1 -1
- data/.travis.yml +1 -1
- data/config/enabled.yml +50 -11
- data/config/todo.yml +25 -14
- data/forkwell_cop.gemspec +4 -4
- data/lib/forkwell_cop/version.rb +1 -1
- metadata +21 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9471e0d96dc7446a0aa0e51b8a20b8099c8700c77619df97ca8ff60598ce8ecc
|
4
|
+
data.tar.gz: 59a40a93d9cc3b477c6f245a4db0b0a6f5c79cea733a65c0fd7749ecbff83cf8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6388f534a80731b024f14366ff8742447cda65beee90e96ac818db3b104ec588c3864fc99ccc586ffcd5c8cc1dbc96a62cbbe01f32bee6c7d7e6a8f0548061a6
|
7
|
+
data.tar.gz: 923e0a4e9934d554413b2c1a6b4eb995a16072c29a0185c2dd71e042da83644897c35b3aff320cf477046ca85dff5ab9368a62bb32d78ff5b557dc39ab9d7c2e
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.5.1
|
data/.travis.yml
CHANGED
data/config/enabled.yml
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
require:
|
2
|
+
- rubocop-performance
|
3
|
+
|
1
4
|
AllCops:
|
2
5
|
# .ruby-version の指定と合わせるため指定しない
|
3
6
|
# TargetRubyVersion: ~
|
@@ -13,6 +16,8 @@ AllCops:
|
|
13
16
|
- 'bin/rspec'
|
14
17
|
- 'bin/rubocop'
|
15
18
|
- 'bin/spring'
|
19
|
+
- 'bin/webpack'
|
20
|
+
- 'bin/webpack-dev-server'
|
16
21
|
|
17
22
|
Rails:
|
18
23
|
Enabled: true
|
@@ -48,6 +53,17 @@ Metrics/CyclomaticComplexity:
|
|
48
53
|
Metrics/PerceivedComplexity:
|
49
54
|
Max: 9
|
50
55
|
|
56
|
+
Naming/AccessorMethodName:
|
57
|
+
Exclude:
|
58
|
+
# # action_args を使うため
|
59
|
+
# before_action :set_user
|
60
|
+
#
|
61
|
+
# def set_user(id)
|
62
|
+
# @user = User.find(id)
|
63
|
+
# end
|
64
|
+
- '**/*_controller.rb'
|
65
|
+
- 'app/controllers/concerns/**/*.rb'
|
66
|
+
|
51
67
|
# # 宗教の違いを許容する
|
52
68
|
# def some_method_with_parameters param1, param2
|
53
69
|
# # body omitted
|
@@ -59,16 +75,6 @@ Metrics/PerceivedComplexity:
|
|
59
75
|
Style/MethodDefParentheses:
|
60
76
|
Enabled: false
|
61
77
|
|
62
|
-
Style/AccessorMethodName:
|
63
|
-
Exclude:
|
64
|
-
# # action_args を使うため
|
65
|
-
# before_action :set_user
|
66
|
-
#
|
67
|
-
# def set_user(id)
|
68
|
-
# @user = User.find(id)
|
69
|
-
# end
|
70
|
-
- '**/*_controller.rb'
|
71
|
-
|
72
78
|
# 日本語コメントを許容する
|
73
79
|
Style/AsciiComments:
|
74
80
|
Enabled: false
|
@@ -86,7 +92,7 @@ Style/LambdaCall:
|
|
86
92
|
# and_in_a_method_call({
|
87
93
|
# no: :difference
|
88
94
|
# })
|
89
|
-
Layout/
|
95
|
+
Layout/IndentFirstHashElement:
|
90
96
|
EnforcedStyle: consistent
|
91
97
|
|
92
98
|
# ドキュメントの無い public クラスを許容する
|
@@ -96,3 +102,36 @@ Style/Documentation:
|
|
96
102
|
# email など NOT NULL でもデフォルト値を指定できないカラムは存在する
|
97
103
|
Rails/NotNullColumn:
|
98
104
|
Enabled: false
|
105
|
+
|
106
|
+
# map...flatten はだいたい flat_map に直せるのでチェックしておく
|
107
|
+
Performance/FlatMap:
|
108
|
+
EnabledForFlattenWithoutParams: true
|
109
|
+
|
110
|
+
# alias, alias_method で細かい挙動が変わるため、使い分ける必要がある
|
111
|
+
#
|
112
|
+
# 参考: http://blog.bigbinary.com/2012/01/08/alias-vs-alias-method.html
|
113
|
+
Style/Alias:
|
114
|
+
Enabled: false
|
115
|
+
|
116
|
+
# - Emacs のデフォルトが with_first_parameter
|
117
|
+
# - Vim のデフォルトが with_fixed_indentation
|
118
|
+
#
|
119
|
+
# という宗教の違いを許容する
|
120
|
+
Layout/AlignParameters:
|
121
|
+
Enabled: false
|
122
|
+
|
123
|
+
# データ移行のために execute を使うことがあるため許容する
|
124
|
+
Rails/ReversibleMigration:
|
125
|
+
Enabled: false
|
126
|
+
|
127
|
+
# typo に気付けるようにするため
|
128
|
+
Rails/UnknownEnv:
|
129
|
+
Environments:
|
130
|
+
- development
|
131
|
+
- test
|
132
|
+
- production
|
133
|
+
- staging
|
134
|
+
|
135
|
+
# 子レコードを残しておきたい場合もあるため許容する
|
136
|
+
Rails/HasManyOrHasOneDependent:
|
137
|
+
Enabled: false
|
data/config/todo.yml
CHANGED
@@ -21,12 +21,6 @@ Rails/OutputSafety:
|
|
21
21
|
Rails/Validation:
|
22
22
|
Enabled: false
|
23
23
|
|
24
|
-
Style/Alias:
|
25
|
-
Enabled: true
|
26
|
-
|
27
|
-
Layout/AlignParameters:
|
28
|
-
Enabled: true
|
29
|
-
|
30
24
|
Style/BlockDelimiters:
|
31
25
|
Enabled: false
|
32
26
|
|
@@ -45,13 +39,10 @@ Style/ClassVars:
|
|
45
39
|
Style/DoubleNegation:
|
46
40
|
Enabled: true
|
47
41
|
|
48
|
-
Style/HashSyntax:
|
49
|
-
Enabled: false
|
50
|
-
|
51
42
|
Layout/MultilineMethodCallIndentation:
|
52
43
|
Enabled: false
|
53
44
|
|
54
|
-
|
45
|
+
Naming/VariableNumber:
|
55
46
|
Enabled: false
|
56
47
|
|
57
48
|
Style/GuardClause:
|
@@ -89,10 +80,30 @@ Style/EmptyMethod:
|
|
89
80
|
Rails/FilePath:
|
90
81
|
Enabled: false
|
91
82
|
|
92
|
-
# https://github.com/bbatsov/rubocop/blob/v0.47.1/lib/rubocop/cop/rails/reversible_migration.rb
|
93
|
-
Rails/ReversibleMigration:
|
94
|
-
Enabled: false
|
95
|
-
|
96
83
|
# https://github.com/bbatsov/rubocop/blob/v0.47.1/lib/rubocop/cop/rails/skips_model_validations.rb
|
97
84
|
Rails/SkipsModelValidations:
|
98
85
|
Enabled: false
|
86
|
+
|
87
|
+
# https://github.com/bbatsov/rubocop/blob/v0.48.0/lib/rubocop/cop/lint/ambiguous_block_association.rb
|
88
|
+
Lint/AmbiguousBlockAssociation:
|
89
|
+
Enabled: false
|
90
|
+
|
91
|
+
# https://github.com/bbatsov/rubocop/blob/v0.48.0/lib/rubocop/cop/style/symbol_array.rb
|
92
|
+
Style/SymbolArray:
|
93
|
+
Enabled: false
|
94
|
+
|
95
|
+
# https://github.com/bbatsov/rubocop/blob/v0.50.0/lib/rubocop/cop/layout/empty_line_after_magic_comment.rb
|
96
|
+
Layout/EmptyLineAfterMagicComment:
|
97
|
+
Enabled: false
|
98
|
+
|
99
|
+
# https://github.com/bbatsov/rubocop/blob/v0.52.0/lib/rubocop/cop/style/rescue_standard_error.rb
|
100
|
+
Style/RescueStandardError:
|
101
|
+
Enabled: false
|
102
|
+
|
103
|
+
# https://github.com/bbatsov/rubocop/blob/v0.53.0/lib/rubocop/cop/naming/memoized_instance_variable_name.rb
|
104
|
+
Naming/MemoizedInstanceVariableName:
|
105
|
+
Enabled: false
|
106
|
+
|
107
|
+
# https://github.com/bbatsov/rubocop/blob/v0.53.0/lib/rubocop/cop/naming/uncommunicative_method_param_name.rb
|
108
|
+
Naming/UncommunicativeMethodParamName:
|
109
|
+
Enabled: false
|
data/forkwell_cop.gemspec
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
# coding: utf-8
|
2
1
|
# frozen_string_literal: true
|
3
2
|
|
4
|
-
lib = File.expand_path('
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
5
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
6
5
|
require 'forkwell_cop/version'
|
7
6
|
|
@@ -17,7 +16,8 @@ Gem::Specification.new do |spec|
|
|
17
16
|
spec.files = `git ls-files -z`.split("\x0")
|
18
17
|
spec.require_paths = ['lib']
|
19
18
|
|
20
|
-
spec.add_dependency 'rubocop', '~> 0.
|
21
|
-
spec.
|
19
|
+
spec.add_dependency 'rubocop', '~> 0.68'
|
20
|
+
spec.add_dependency 'rubocop-performance', '~> 1.3.0'
|
21
|
+
spec.add_development_dependency 'bundler', '~> 1.17.3'
|
22
22
|
spec.add_development_dependency 'rake', '~> 10.0'
|
23
23
|
end
|
data/lib/forkwell_cop/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forkwell_cop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- grooves
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -16,28 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.68'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
26
|
+
version: '0.68'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rubocop-performance
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.3.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.3.0
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
45
|
- - "~>"
|
32
46
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
47
|
+
version: 1.17.3
|
34
48
|
type: :development
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
52
|
- - "~>"
|
39
53
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
54
|
+
version: 1.17.3
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rake
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -90,8 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
104
|
- !ruby/object:Gem::Version
|
91
105
|
version: '0'
|
92
106
|
requirements: []
|
93
|
-
|
94
|
-
rubygems_version: 2.6.11
|
107
|
+
rubygems_version: 3.0.3
|
95
108
|
signing_key:
|
96
109
|
specification_version: 4
|
97
110
|
summary: RuboCop configration in Forkwell
|