onkcop 0.35.1.1 → 0.36.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -23
- data/Rakefile +0 -1
- data/config/rubocop.yml +10 -17
- data/lib/onkcop/version.rb +1 -1
- data/onkcop.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 170d81789be9cb577075fa95f39b3448a4163406
|
4
|
+
data.tar.gz: fff22f2556997a5e4edf0a44a3d77703d556774a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 09c796a42a360b69e18cd91af5aaf47afe1db5ce316d21daf8dfb081fed90636d0991b1b5fb8d7f559731393358838b77fb185e966842a180acaa491f0bb6b13
|
7
|
+
data.tar.gz: ce71f1138614f3e643f1e0571389b22414077b2ff2e8f213390e2f60083274657867d06492594527b96f2efc7a0c93157652886431300d427c222398cfd05e17
|
data/README.md
CHANGED
@@ -1,29 +1,10 @@
|
|
1
1
|
# onkcop
|
2
|
+
[![Gem Version](https://badge.fury.io/rb/onkcop.svg)](https://badge.fury.io/rb/onkcop)
|
2
3
|
|
3
4
|
OnkCop is a RuboCop configration gem.
|
4
5
|
|
5
6
|
[rubocop のしつけ方 - onk.ninja](http://blog.onk.ninja/2015/10/27/rubocop-getting-started)
|
6
7
|
|
7
|
-
## Installation
|
8
|
-
|
9
|
-
Add this line to your application's Gemfile:
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
gem "onkcop"
|
13
|
-
```
|
14
|
-
|
15
|
-
And then execute:
|
16
|
-
|
17
|
-
```sh
|
18
|
-
$ bundle
|
19
|
-
```
|
20
|
-
|
21
|
-
Or install it yourself as:
|
22
|
-
|
23
|
-
```sh
|
24
|
-
$ gem install onkcop
|
25
|
-
```
|
26
|
-
|
27
8
|
## Usage
|
28
9
|
|
29
10
|
Add the following directive to your `.rubocop.yml`:
|
@@ -31,17 +12,22 @@ Add the following directive to your `.rubocop.yml`:
|
|
31
12
|
```yaml
|
32
13
|
inherit_gem:
|
33
14
|
onkcop: "config/rubocop.yml"
|
15
|
+
|
16
|
+
AllCops:
|
17
|
+
TargetRubyVersion: 2.3
|
34
18
|
```
|
35
19
|
|
36
20
|
```sh
|
37
21
|
bundle exec rubocop <options...>
|
38
22
|
```
|
39
23
|
|
40
|
-
##
|
24
|
+
## Installation
|
41
25
|
|
42
|
-
|
26
|
+
Add this line to your application's Gemfile:
|
43
27
|
|
44
|
-
|
28
|
+
```ruby
|
29
|
+
gem "onkcop"
|
30
|
+
```
|
45
31
|
|
46
32
|
## Contributing
|
47
33
|
|
data/Rakefile
CHANGED
data/config/rubocop.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# target_version:
|
2
|
-
# rubocop v0.
|
2
|
+
# rubocop v0.36.0
|
3
3
|
|
4
4
|
# 自動生成されるものはチェック対象から除外する
|
5
5
|
AllCops:
|
@@ -78,6 +78,10 @@ Style/ExtraSpacing:
|
|
78
78
|
Style/FormatString:
|
79
79
|
EnforcedStyle: percent
|
80
80
|
|
81
|
+
# まだ対応するには早い
|
82
|
+
Style/FrozenStringLiteralComment:
|
83
|
+
Enabled: false
|
84
|
+
|
81
85
|
# if 文の中に 3 行程度のブロックを書くぐらいは許容した方が現実的
|
82
86
|
Style/GuardClause:
|
83
87
|
MinBodyLength: 5
|
@@ -88,6 +92,10 @@ Style/HashSyntax:
|
|
88
92
|
- "**/*.rake"
|
89
93
|
- "Rakefile"
|
90
94
|
|
95
|
+
# 平たくしてしまうと条件のグルーピングが脳内モデルとズレやすい
|
96
|
+
Style/IfInsideElse:
|
97
|
+
Enabled: false
|
98
|
+
|
91
99
|
# 条件式の方を意識させたい場合には後置の if/unless を使わない方が分かりやすい
|
92
100
|
Style/IfUnlessModifier:
|
93
101
|
Enabled: false
|
@@ -140,13 +148,6 @@ Style/Semicolon:
|
|
140
148
|
Style/SignalException:
|
141
149
|
EnforcedStyle: only_raise
|
142
150
|
|
143
|
-
# `||` も align に使うことがあるので追加する
|
144
|
-
Style/SpaceAroundOperators:
|
145
|
-
MultiSpaceAllowedForOperators:
|
146
|
-
- "="
|
147
|
-
- "=>"
|
148
|
-
- "||"
|
149
|
-
|
150
151
|
# * 式展開したい場合に書き換えるのが面倒
|
151
152
|
# * 文章ではダブルクォートよりもシングルクォートの方が頻出する
|
152
153
|
# ことから EnforcedStyle: double_quotes 推奨
|
@@ -161,16 +162,8 @@ Style/StringLiteralsInInterpolation:
|
|
161
162
|
Style/SingleLineBlockParams:
|
162
163
|
Enabled: false
|
163
164
|
|
164
|
-
# * migrate
|
165
|
-
# * jbuilder
|
166
|
-
# * model の association
|
167
|
-
# * controller の callback
|
168
|
-
# 辺りの桁揃えで引っかかるので全体的にチェックしない
|
169
|
-
Style/SingleSpaceBeforeFirstArg:
|
170
|
-
Enabled: false
|
171
|
-
|
172
165
|
# 複数行の場合はケツカンマを入れる
|
173
|
-
Style/
|
166
|
+
Style/TrailingCommaInLiteral:
|
174
167
|
EnforcedStyleForMultiline: comma
|
175
168
|
|
176
169
|
##################### Lint ##################################
|
data/lib/onkcop/version.rb
CHANGED
data/onkcop.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
|
-
spec.add_dependency "rubocop", "
|
22
|
+
spec.add_dependency "rubocop", "~> 0.36.0"
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.11"
|
24
24
|
spec.add_development_dependency "rake", "~> 10.0"
|
25
25
|
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onkcop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.36.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takafumi ONAKA
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.36.0
|
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.36.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|