rubocop-codetakt 0.8.2 → 0.83.0.1

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
2
  SHA256:
3
- metadata.gz: e5fc4b81292ed87a5f4e003a057a013303e9f21a66bc67a6ab90ab6cb9ecc799
4
- data.tar.gz: ff5fe0547dd20586262f1bc2c1a2347c664522c97369e43c5ef63f128489c37a
3
+ metadata.gz: 4a1a116f7ed49f573043d6ec43bf766e3b028b0c671fdfbc5ee8dca477f7e1ab
4
+ data.tar.gz: 92943f9030680a56b48a0477abb497cc1a341d42176a0265a3e9051e09eb7b8b
5
5
  SHA512:
6
- metadata.gz: 667c25375e3eae42d7da67324f69b8f45010ac4c8baa8ebb0805dffa7db06949edadc233facab7560db44401bd3e1566cda045747ea7a8a83eea9a281a8ea5c5
7
- data.tar.gz: 38d5a2270dc655ed81e81b40a4a13ee42bee26146a7804eba1913b52e0caece5b92d87d55dd5a0d067175528164c7662399dc4f924269440cf1f29afa15f0459
6
+ metadata.gz: 87cbb1f19770f0d47af091cb58325663bb0aefd1c1288285327d31a2b66143ff68eaf6c49a800062661a81ff0ee1dcd1401fa2ce202c3b05fa76f252cabf1077
7
+ data.tar.gz: 1a06732e7f232b43bad6c9ceb10c540e2e90be636a42c60d0a9eab6d1ba29f5172cf37d6342505f94e399912bcc2f755c69bf13fdb7fda2ad29a96228e20f336
@@ -0,0 +1,10 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ /.rspec_status
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --require spec_helper
@@ -0,0 +1,4 @@
1
+ inherit_from:
2
+ - "config/rubocop.yml"
3
+ - "config/performance.yml"
4
+ - "config/rspec.yml"
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ cache: bundler
3
+ rvm:
4
+ - ruby-head
@@ -1,73 +1,233 @@
1
- # rubocop-codetakt
1
+ # rubocop-codetakt:
2
2
 
3
- ## v0.7.0 (2017-07-11)
3
+ ## v0.83.0.1 (2020-06-03)
4
4
 
5
- [full changelog](https://github.com/codetakt/rubocop-codetakt/compare/v0.6.0...v0.7.0)
5
+ * Disalbe `RSpec/MultipleExpectations:` cop
6
6
 
7
- * Loosen RSpec/NestedGroups to Max: 4.
8
- * Backport "Disable RSpec/EmptyLineAfterFinalLet cop"
9
- * From: https://github.com/onk/onkcop/pull/30
7
+ ## v0.83.0.0 (2020-05-18)
10
8
 
11
- ## v0.6.0 (2017-06-14)
9
+ * Update `rubocop` v0.83.0
12
10
 
13
- [full changelog](https://github.com/codetakt/rubocop-codetakt/compare/v0.5.0...v0.6.0)
11
+ ## v0.82.0.1 (2020-06-01)
14
12
 
15
- * Disable the Style/MethodCalledOnDoEndBlock cop.
13
+ * Make the code in this repository to no offenses
14
+ * Accept the default setting of new cops
16
15
 
17
- ## v0.5.0 (2017-04-30)
16
+ ## v0.82.0.0 (2020-04-20)
18
17
 
19
- [full changelog](https://github.com/codetakt/rubocop-codetakt/compare/v0.4.0...v0.5.0)
18
+ * Fork from onk/onkcop to codetakt/rubocop-codetakt
19
+ * Update `rubocop` v0.82.0, `rubocop-rspec` v1.38.0, `rubocop-rails` v2.5.0 and `rubocop-performance` v1.5.0
20
+ * Follow upstream renamings
21
+ * Separate the file of performance settings
22
+ * Clarify requiring the `rubocop-rails` gem in the Rails settings file
23
+ * Refine dependency settings
24
+ * Remove `Layout/DotPosition` cop'
25
+ * Remove `Layout/IndentationConsistency` cop
26
+ * Remove `Style/BracesAroundHashParameters` cop
27
+ * Remove `Style/MethodCalledOnDoEndBlock`
28
+ * Remove `Style/StringLiteralsInInterpolation` cop
29
+ * Remove `Style/StringLiterals` cop
30
+ * Change `Metrics/AbcSize` cop option
31
+ * Change `Metrics/PerceivedComplexity` cop option
32
+ * Change `Layout/MultilineMethodCallIndentation` cop option
33
+ * Change `Style/TrailingCommaInArguments` cop option
34
+ * Change `Style/TrailingCommaInArrayLiteral` cop option
35
+ * Change `Style/TrailingCommaInHashLiteral` cop option
36
+ * Change `Rails/ApplicationRecord` cop option
20
37
 
21
- * Update `onkcop` v0.48.1.1.
22
- * Disable the RSpec/DescribedClass cop for the request specs.
38
+ ## v0.53.0.3 (2019-01-20)
23
39
 
24
- ## v0.4.0 (2017-04-07)
40
+ * Ignored `Style/YodaCondition` (@sue445)
25
41
 
26
- [full changelog](https://github.com/codetakt/rubocop-codetakt/compare/v0.3.0...v0.4.0)
42
+ ## v0.53.0.2 (2018-10-11)
27
43
 
28
- * Disable the Style/WordArray cop and the Style/SymbolArray cop.
44
+ * Remove `Style/EmptyLineAfterGuardClause` cop's configuration
29
45
 
30
- ## v0.3.0 (2017-04-03)
46
+ ## v0.53.0.1 (2018-08-17)
31
47
 
32
- [full changelog](https://github.com/codetakt/rubocop-codetakt/compare/v0.2.3...v0.3.0)
48
+ * Relax rubocop dependency for `rubocop-rspec` (@sue445)
33
49
 
34
- * Use the onkcop v0.48.0.0.
35
- * Update the Changelog.
50
+ ## v0.53.0.0 (2018-03-09)
36
51
 
37
- ## v0.2.3 (2017-03-27)
52
+ * Update `rubocop` v0.53.0 and `rubocop-rspec` v1.24.0
53
+ * `Style/TrailingCommaInLiteral` cop is separated to `Style/TrailingCommaInArrayLiteral` and `Style/TrailingCommaInHashLiteral`
54
+ * `Performance/HashEachMethods` cop is removed
55
+ * Disable new `Naming/UncommunicativeMethodParamName` cop
56
+ * Enable `Style/FormatStringToken` cop
57
+ * Enable new `Style/EmptyLineAfterGuardClause` cop
58
+ * Enable `Lint/Void` cop's mutating methods check
59
+ * Remove `TargetRailsVersion` from template
60
+ * Change `Layout/SpaceInsideBlockBraces` cop option
38
61
 
39
- [full changelog](https://github.com/codetakt/rubocop-codetakt/compare/v0.2.2...v0.2.3)
62
+ ## v0.52.1.1 (2018-01-11)
40
63
 
41
- * Add the new config "config/rails4.yml".
42
- For prevent the False positives in Rails 4.2.
64
+ * Update `rubocop-rspec` to v1.22.0
65
+ * Change new `RSpec/ExpectChange` cop to `block` style
43
66
 
44
- ## v0.2.2 (2017-03-27)
45
67
 
46
- [full changelog](https://github.com/codetakt/rubocop-codetakt/compare/v0.2.1...v0.2.2)
68
+ ## v0.52.1.0 (2017-12-28)
47
69
 
48
- * Follow the RuboCop updates to the version 0.48.
70
+ * Update `rubocop` to v0.52.1
71
+ * Use `Layout/SpaceBeforeBlockBraces` cop's default configuration
72
+ * Update `TargetRubyVersion` of auto-generate configuration to 2.5
73
+ * `Lint/AmbiguousBlockAssociation`, `Style/BlockDelimiters` and
74
+ `Style/Semicolon` cops are now exclude only `spec/**/*_spec.rb` instead of `spec/**/*`
49
75
 
50
- See the upstream's release note: <https://github.com/bbatsov/rubocop/releases/tag/v0.48.0>
51
76
 
52
- ## v0.2.1 (2017-03-22)
77
+ ## v0.52.0.0 (2017-12-20)
53
78
 
54
- [full changelog](https://github.com/codetakt/rubocop-codetakt/compare/v0.2.0...v0.2.1)
79
+ * Update `rubocop` v0.52.0 and `rubocop-rspec` v1.21.0
80
+ * Remove `DisplayCopNames` configuration
81
+ * Enable new `Style/ClassStructure` cop
82
+ * Disalbe `Style/FormatStringToken` cop
83
+ * Change `Layout/SpaceBeforeBlockBraces` cop's empty braces style to `space`
84
+ * Change `Style/RescueStandardError` cop to implicit style
85
+ * Change `RSpec/MultipleExpectations` cop to `AggregateFailuresByDefault` style
86
+ * Exclude `bin/setup`, `bin/update` from `Style/MixinUsage` cop
55
87
 
56
- * Fix README's typo.
57
88
 
58
- ## v0.2.0 (2017-03-21)
89
+ ## v0.51.0.1 (2017-11-11)
59
90
 
60
- [full changelog](https://github.com/codetakt/rubocop-codetakt/compare/v0.1.0...v0.2.0)
91
+ * Update `rubocop-rspec` to v1.20.0
92
+ * Disable new `RSpec/ContextWording` cop
93
+ * Disable `Rails/Delegate`, `Rails/Exit`, `Rails/FilePath`,
94
+ `Rails/PluralizationGrammar` and `Rails/Present` cops
95
+ * Enable `Rails/NotNullColumn` cop
61
96
 
62
- * Enabled:
63
- * `DisplayCopNames`
64
97
 
65
- * Disabled:
66
- * `Style/DoubleNegation`
98
+ ## v0.51.0.0 (2017-10-20)
67
99
 
68
- * Loosened:
69
- * `Metrics/AbcSize`
70
- * `Metrics/CyclomaticComplexity`
71
- * `Metrics/LineLength`
72
- * `Metrics/MethodLength`
73
- * `Metrics/PerceivedComplexity`
100
+ * Update `rubocop` v0.51.0 and `rubocop-rspec` v1.19.0
101
+ * Enable `Lint/ReturnInVoidContext` cop
102
+ * Add `staging` env to `Rails/UnknownEnv` cop
103
+ * Add comments to `Style/SafeNavigation` and `Lint/UnusedMethodArgument` cop
104
+
105
+
106
+ ## v0.50.0.0 (2017-10-12)
107
+
108
+ * Update `rubocop` v0.50.0 and `rubocop-rspec` v1.18.0
109
+ * Disable `Performance/HashEachMethods` cop
110
+ * Disable new `Style/OrAssignment` cop
111
+ * Change cop's department from `Style` to `Naming`
112
+ * Disable new `Lint/RescueWithoutErrorClass` cop
113
+ * `node_modules` directory is now excluded by rubocop as default
114
+ * Enable `Style/YodaCondition` cop with `equality_operators_only` style
115
+
116
+
117
+ ## v0.49.1.1 (2017-09-11)
118
+
119
+ [full changelog](https://github.com/onk/onkcop/compare/v0.49.1.0...v0.49.1.1)
120
+
121
+ * Update `rubocop-rspec` v1.16.0
122
+ * Disable new `RSpec/ReturnFromStub` cop.
123
+ * Exclude `config/environments/*.rb` from Metrics/BlockLength cop.
124
+ * Disable `Performance/Casecmp` cop.
125
+ * Disable `RSpec/EmptyLineAfterFinalLet` cop.
126
+ * Relax `RSpec/NestedGroups` cop.
127
+
128
+
129
+ ## v0.49.1.0 (2017-05-31)
130
+
131
+ [full changelog](https://github.com/onk/onkcop/compare/v0.49.0.0...v0.49.1.0)
132
+
133
+ * Update `rubocop` v0.49.1.
134
+ * Change `Style/TrailingCommaInArguments` to `comma` style.
135
+
136
+
137
+ ## v0.49.0.0 (2017-05-25)
138
+
139
+ [full changelog](https://github.com/onk/onkcop/compare/v0.48.1.1...v0.49.0.0)
140
+
141
+ * Update `rubocop` v0.49.0 and `rubocop-rspec` v1.15.1
142
+ * Enable `Lint/AmbiguousBlockAssociation` cop except `spec/**/*`
143
+ * Change some cops to `Layout` department
144
+ * Disable new `Style/YodaCondition` cop
145
+
146
+
147
+ ## v0.48.1.1 (2017-04-18)
148
+
149
+ [full changelog](https://github.com/onk/onkcop/compare/v0.48.1.0...v0.48.1.1)
150
+
151
+ * Disable `Lint/AmbiguousBlockAssociation` cop.
152
+
153
+
154
+ ## v0.48.1.0 (2017-04-17)
155
+
156
+ [full changelog](https://github.com/onk/onkcop/compare/v0.48.0.0...v0.48.1.0)
157
+
158
+ * Update `rubocop` v0.48.1.
159
+ * Enable `Rails/Blank` cop.
160
+ * Enable `Lint/AmbiguousBlockAssociation` cop.
161
+ * Remove Exclude option from `Style/MixinGrouping` cop.
162
+ * Change `Style/NumericLiterals` cop to `Strict`.
163
+
164
+
165
+ ## v0.48.0.0 (2017-03-29)
166
+
167
+ [full changelog](https://github.com/onk/onkcop/compare/v0.47.1.2...v0.48.0.0)
168
+
169
+ * Update `rubocop` v0.48.0.
170
+ * Disable new `Lint/AmbiguousBlockAssociation` cop.
171
+ * Disable new `Rails/Blank` cop.
172
+ * Disable `Style/SymbolArray`, `StyleWordArray` cop.
173
+ * Change `Style/MultilineMethodCallIndentation` to `indented_relative_to_receiver` style.
174
+ * Exclude RSpec directory from new `Style/MixinGrouping` cop.
175
+ * Ignore `node_modules` dir.
176
+ * Add `TargetRailsVersion` to README and template
177
+
178
+
179
+ ## v0.47.1.2 (2017-03-01)
180
+
181
+ [full changelog](https://github.com/onk/onkcop/compare/v0.47.1.1...v0.47.1.2)
182
+
183
+ * Change `Style/StringLiteralsInInterpolation` to `double_quotes` style.
184
+
185
+
186
+ ## v0.47.1.1 (2017-03-01)
187
+
188
+ [full changelog](https://github.com/onk/onkcop/compare/v0.47.1.0...v0.47.1.1)
189
+
190
+ * Update `rubocop-rspec` v1.12.0.
191
+ * Enable `Style/StringMethods` cop.
192
+ * Enable `Style/StringLiteralsInInterpolation` cop.
193
+ * Change `RSpec/DescribedClass` to `explicit` style.
194
+ * Exclude `*.gemspec` from `Metrics/BlockLength` cop.
195
+ * Disable `Lint/EmptyWhen` cop.
196
+
197
+
198
+ ## v0.47.1.0 (2017-01-20)
199
+
200
+ [full changelog](https://github.com/onk/onkcop/compare/v0.46.0.1...v0.47.1.0)
201
+
202
+ * Update to `rubocop` v0.47.1 and `rubocop-rspec` v1.10.0.
203
+ * Remove `Style/SingleLineBlockParams` cop config because disabled by default.
204
+ * Disable new `Security/YAMLLoad` cop.
205
+
206
+
207
+ ## v0.46.0.1 (2017-01-07)
208
+
209
+ [full changelog](https://github.com/onk/onkcop/compare/v0.46.0.0...v0.46.0.1)
210
+
211
+ * Update to `rubocop-rspec` v1.9.1.
212
+ * Disable `RSpec/MessageExpectation` cop that is replaced with a new cop: `RSpec/MessageSpies`.
213
+ * Add CLI for setup `.rubocop.yml`.
214
+
215
+
216
+ ## v0.46.0.0 (2016-11-30)
217
+
218
+ [full changelog](https://github.com/onk/onkcop/compare/v0.45.0.0...v0.46.0.0)
219
+
220
+ * Update to `rubocop` v0.46.0.
221
+ * Use new `Style/EmptyMethod` cop with `expanded` style.
222
+ * Use `Style/TernaryParentheses` cop `require_parentheses_when_complex` style.
223
+
224
+
225
+ ## v0.45.0.0 (2016-11-02)
226
+ [full changelog](https://github.com/onk/onkcop/compare/v0.44.1.1...v0.45.0.0)
227
+
228
+ * Update to `rubocop` v0.45.0 and `rubocop-rspec` v1.8.0.
229
+ * Disable new `RSpec/ImplicitExpect` cop.
230
+ * Explicitly enable `Rspec/MessageExpectation` cop that is now disabled by default.
231
+ * Exclude Gemfile, Guardfile on `Metrics/BlockLength`.
232
+ * Disable `Style/TernaryParentheses` cop.
233
+ * Enable `Rails/HttpPositionalArguments` cop that fixes bug.
data/Gemfile ADDED
@@ -0,0 +1,10 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in rubocop-codetakt.gemspec
4
+ gemspec
5
+
6
+ gem 'rake', '~> 12.0'
7
+ gem 'rspec', '~> 3.0'
8
+ gem 'rubocop-performance', '~> 1.5.0'
9
+ gem 'rubocop-rails', '~> 2.5.0'
10
+ gem 'rubocop-rspec', '~> 1.38.0'
@@ -1,6 +1,8 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2017 codeTakt
3
+ Copyright for portions of project rubocop-codetakt are held by Takafumi
4
+ ONAKA, 2019 as part of project onkcop. All other copyright for project
5
+ rubocop-codetakt are held by codeTakt, 2020.
4
6
 
5
7
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
8
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,38 +1,55 @@
1
- # What is this?
1
+ # rubocop-codetakt
2
2
 
3
- Common RuboCop configurations for the codeTakt's project.
4
- Based the [onkcop][1].
3
+ [![Gem Version](https://badge.fury.io/rb/rubocop-codetakt.svg)](https://badge.fury.io/rb/rubocop-codetakt)
4
+
5
+ This includes the RuboCop configuration used by codeTakt. It is for the unification and linfting of coding styles.
6
+
7
+ **IMPORTANT** This repository is forked from onk/onkcop v0.53.0.3 (979b8e74eda394434e49caaee31d3f3d781d14f6). And it has been modified for our team. Therefore, it should not be regarded as a successor.
5
8
 
6
9
  ## Usage
7
10
 
8
- Put this configurations and RuboCop to your `Gemfile`.
11
+ Setup .rubocop.yml
9
12
 
10
- In general:
13
+ ```sh
14
+ bundle exec rubocop-codetakt init
15
+ ```
11
16
 
12
- ```ruby
13
- gem 'rubocop-codetakt'
17
+ `init` generate the following directive to your `.rubocop.yml`:
18
+
19
+ ```yaml
20
+ inherit_gem:
21
+ rubocop-codetakt:
22
+ - "config/rubocop.yml"
23
+ # uncomment if use performance cops
24
+ # - "config/performance.yml"
25
+ # uncomment if use rails cops
26
+ # - "config/rails.yml"
27
+ # uncomment if use rspec cops
28
+ # - "config/rspec.yml"
29
+
30
+ AllCops:
31
+ TargetRubyVersion: 2.5
14
32
  ```
15
33
 
16
- Rails product:
34
+ ```sh
35
+ bundle exec rubocop <options...>
36
+ ```
37
+
38
+ ## Installation
39
+
40
+ Add this line to your application's Gemfile:
17
41
 
18
42
  ```ruby
19
43
  group :development do
20
- gem 'rubocop-codetakt', require: false
44
+ gem "rubocop-codetakt", require: false
21
45
  end
22
46
  ```
23
47
 
24
- And then create `.rubocop.yml`:
48
+ ## Contributing
49
+
50
+ Bug reports and pull requests are welcome on GitHub at https://github.com/codetakt/rubocop-codetakt.
25
51
 
26
- ```yaml
27
- inherit_gem:
28
- rubocop-codetakt:
29
- - config/rubocop.yml
30
- - config/rails.yml # optional.
31
- - config/rspec.yml # optional.
32
- ```
33
52
 
34
53
  ## License
35
54
 
36
55
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
37
-
38
- [1]: https://github.com/onk/onkcop
@@ -0,0 +1,4 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+ RSpec::Core::RakeTask.new(:rspec)
4
+ task :default => [:rspec]
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'rubocop_codetakt'
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require 'irb'
14
+ IRB.start
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,6 @@
1
+ require: "rubocop-performance"
2
+
3
+ # downcase or upcase しての比較はイディオムの域なので、多少の
4
+ # パフォーマンスの違いがあろうが casecmp に変える意義を感じない
5
+ Performance/Casecmp:
6
+ Enabled: false
@@ -1,3 +1,60 @@
1
- inherit_gem:
2
- onkcop:
3
- - config/rails.yml
1
+ require: "rubocop-rails"
2
+
3
+ Rails:
4
+ Enabled: true
5
+
6
+ # Migrations are must not depend to the ApplicationRecord,
7
+ # because the AR is mutable.
8
+ # So each migration should be reproducible in the future.
9
+ Rails/ApplicationRecord:
10
+ Exclude:
11
+ - "db/migrate/*.rb"
12
+
13
+ # ActiveRecord で association を安易に delegate すると
14
+ # N+1 を起こしまくるので、なるべく delegate 的なメソッドを使わずに
15
+ # コストが掛かっていることを自覚できるようにしておきたい。
16
+ # メソッドでも危ういが、DSL だと更に意識から抜けるので無効に。
17
+ Rails/Delegate:
18
+ Enabled: false
19
+
20
+ # 意図せずに exit を書くこと無いでしょ?
21
+ # 毎回 Exclude / rubocop:disable する方が手間。
22
+ Rails/Exit:
23
+ Enabled: false
24
+
25
+ # -File.join(Rails.root, "app", "models")
26
+ # +Rails.root.join("app", "models")
27
+ # はともかく
28
+ # -Rails.root.join("app/models")
29
+ # +Rails.root.join("app", "models")
30
+ # は Pathname#plus が行っているので意味無いのでは?
31
+ Rails/FilePath:
32
+ Enabled: false
33
+
34
+ # 桁が揃わなくて気持ち悪い
35
+ # create(:user, logged_in_at: 1.day.ago)
36
+ # create(:user, logged_in_at: 2.days.ago)
37
+ Rails/PluralizationGrammar:
38
+ Enabled: false
39
+
40
+ # unless 文を使ってでも「空」を条件にした方が
41
+ # 「存在する」よりも「空」の方が状態として特別なので
42
+ # 脳内モデルと合致しやすい。
43
+ Rails/Present:
44
+ Enabled: false
45
+
46
+ # method_missing を隠したい場合は respond_to? を使うべき
47
+ Rails/SafeNavigation:
48
+ ConvertTry: true
49
+
50
+ # valid? チェックし忘れを防ぎたい
51
+ Rails/SaveBang:
52
+ Enabled: true
53
+
54
+ # staging 環境を使っているので追加
55
+ Rails/UnknownEnv:
56
+ Environments:
57
+ - development # rubocop default.yml
58
+ - test # rubocop default.yml
59
+ - production # rubocop default.yml
60
+ - staging
@@ -1,20 +1,71 @@
1
- inherit_gem:
2
- onkcop:
3
- - config/rspec.yml
1
+ require: "rubocop-rspec"
4
2
 
3
+ # 日本語だと「〜の場合」になるので suffix でないと対応できない
4
+ RSpec/ContextWording:
5
+ Enabled: false
6
+
7
+ # subject はコピペ可搬性よりもそのまま USAGE であって欲しい
5
8
  RSpec/DescribedClass:
9
+ EnforcedStyle: explicit
6
10
  Exclude:
7
11
  - "spec/requests/*"
8
12
 
9
- # Accepts more deeper nests than default(3).
10
- # describe 'Class'
11
- # describe 'method'
12
- # context 'larger scope (behavior)'
13
- # context 'smaller scope (parameter)'
13
+ # it が一つしか無いような context では空行を開ける方が読みづらい
14
+ # context "when foo is bar" do
15
+ # let(:foo) { bar }
16
+ # it { is_expected.to do_something }
17
+ # end
18
+ RSpec/EmptyLineAfterFinalLet:
19
+ Enabled: false
20
+
21
+ # each で回したり aggregate_failures 使ってたりすると厳しい。
22
+ # feature spec は exclude でも良いかもしれない。
23
+ # ヒアドキュメント使うと一瞬で超えるので disable も検討。
24
+ RSpec/ExampleLength:
25
+ Max: 8
26
+
27
+ # block の方がテスト対象が
28
+ # * `{}` の前後のスペースと相まって目立つ
29
+ # * 普段書く形と同じなので自然に脳内に入ってくる
30
+ RSpec/ExpectChange:
31
+ EnforcedStyle: block
32
+
33
+ # one-liner の should は書きやすいし意味が通りやすいし副作用も無いので撥ねる必要がない。
34
+ # ただ expect 派に対して強制するほどでもないので統一はしない。
35
+ RSpec/ImplicitExpect:
36
+ Enabled: false
37
+
38
+ # let を使うのは context 間で条件が違うものが存在する時だけにしたい。
39
+ # before の方が事前条件を整えていることが分かりやすい。
40
+ RSpec/InstanceVariable:
41
+ Enabled: false
42
+
43
+ # rubocop-rspec v1.34.0 から RSpec/MultipleExpectations の AggregateFailuresByDefault オプションがなくなった
44
+ # https://github.com/rubocop-hq/rubocop-rspec/blob/v1.34.0/CHANGELOG.md
45
+ # feature specなどでは1つのitに複数のexpectをよく書く
46
+ # 弊社ではaggregate_failuresをデフォルトで有効にしているのでこのCopをoffにする
47
+ RSpec/MultipleExpectations:
48
+ Enabled: false
49
+
50
+ # 変に名前つけて呼ぶ方が分かりづらい。
51
+ # テスト対象メソッドを呼ぶだけの subject 以外を書かないようにする方が効く。
52
+ RSpec/NamedSubject:
53
+ Enabled: false
54
+
55
+ # Model
56
+ # `- #method
57
+ # |- 頻出ケースのテスト 1
58
+ # |- 頻出ケースのテスト 2
59
+ # `- レアケース
60
+ # |- レアケースのテスト 1
61
+ # `- レアケースのテスト 2
62
+ # のように括り出すと、レアケースのテストを読み飛ばせるようになり
63
+ # テストを読む人にやさしくなる。
64
+ # デフォルトの 3 より少し緩めてもヨサソウ。
14
65
  RSpec/NestedGroups:
15
66
  Max: 4
16
67
 
17
- # TODO: Remove after below PR is released.
18
- # https://github.com/onk/onkcop/pull/30
19
- RSpec/EmptyLineAfterFinalLet:
68
+ # ブロックは初見だと返り値を書いていると気づけないので and_return にしたいが、
69
+ # ブロックの方が見た目がスッキリして見やすいので、どちらでもお好きにどうぞ。
70
+ RSpec/ReturnFromStub:
20
71
  Enabled: false
@@ -1,40 +1,380 @@
1
- inherit_gem:
2
- onkcop:
3
- - config/rubocop.yml
1
+ AllCops:
2
+ # We accept the default setting of rookie cops.
3
+ # https://docs.rubocop.org/rubocop/versioning.html
4
+ NewCops: enable
4
5
 
5
- Layout/DotPosition:
6
- EnforcedStyle: leading
6
+ # Exclude automatically generated files.
7
+ Exclude:
8
+ - "node_modules/**/*" # rubocop config/default.yml
9
+ - "vendor/**/*" # rubocop config/default.yml
10
+ - "db/schema.rb"
7
11
 
12
+ #################### Layout ################################
13
+
14
+ # メソッドをグループ分けして書き順を揃えておくと読みやすくなる。
15
+ # 多少のツラミはあるかもしれない。
16
+ # TODO: Categories を調整することで
17
+ # https://github.com/pocke/rubocop-rails-order_model_declarative_methods
18
+ # を再現できそう。
19
+ Layout/ClassStructure:
20
+ Enabled: true
21
+
22
+ # 桁揃えが綺麗にならないことが多いので migration は除外
23
+ Layout/ExtraSpacing:
24
+ Exclude:
25
+ - "db/migrate/*.rb"
26
+
27
+ # special_inside_parentheses (default) と比べて
28
+ # * 横に長くなりづらい
29
+ # * メソッド名の長さが変わったときに diff が少ない
30
+ Layout/FirstArrayElementIndentation:
31
+ EnforcedStyle: consistent
32
+
33
+ # ({ と hash を開始した場合に ( の位置にインデントさせる
34
+ # そもそも {} が必要ない可能性が高いが Style/BracesAroundHashParameters はチェックしないことにしたので
35
+ Layout/FirstHashElementIndentation:
36
+ EnforcedStyle: consistent
37
+
38
+ # * 警告 120文字
39
+ # * 禁止 160文字
40
+ # のイメージ
41
+ Layout/LineLength:
42
+ Max: 160
43
+ Exclude:
44
+ - "db/migrate/*.rb"
45
+
46
+ # This is a port from our history.
47
+ # Unfortunately, that process has been lost.
8
48
  Layout/MultilineMethodCallIndentation:
9
49
  EnforcedStyle: indented
10
50
  IndentationWidth: 2
11
51
 
52
+ # {} は 1 行で書くときに主に使われるので、スペースよりも
53
+ # 横に長くならない方が嬉しさが多い。
54
+ # そもそも {| のスタイルの方が一般的だったと認識している。
55
+ Layout/SpaceInsideBlockBraces:
56
+ SpaceBeforeBlockParameters: false
57
+
58
+ #################### Lint ##################################
59
+
60
+ # spec 内では
61
+ # expect { subject }.to change { foo }
62
+ # という書き方をよく行うので () を省略したい。
63
+ # { foo } は明らかに change に紐付く。
64
+ Lint/AmbiguousBlockAssociation:
65
+ Exclude:
66
+ - "spec/**/*_spec.rb"
67
+
68
+ # Style/EmptyCaseCondition と同じく網羅の表現力が empty when を認めた方が高いし、
69
+ # 頻出する対象を最初の when で撥ねるのはパフォーマンス向上で頻出する。
70
+ # また、
71
+ # case foo
72
+ # when 42
73
+ # # nop
74
+ # when 1..100
75
+ # ...
76
+ # end
77
+ # と、下の when がキャッチしてしまう場合等に対応していない。
78
+ # See. http://tech.sideci.com/entry/2016/11/01/105900
79
+ Lint/EmptyWhen:
80
+ Enabled: false
81
+
82
+ # RuntimeError は「特定の Error を定義できない場合」なので、
83
+ # 定義できるエラーは RuntimeError ではなく StandardError を継承する。
84
+ Lint/InheritException:
85
+ EnforcedStyle: standard_error
86
+
87
+ # * 同名のメソッドがある場合にローカル変数に `_` を付ける
88
+ # * 一時変数として `_` を付ける
89
+ # というテクニックは頻出する
90
+ Lint/UnderscorePrefixedVariableName:
91
+ Enabled: false
92
+
93
+ # 子クラスで実装させるつもりで中身が
94
+ # raise NotImplementedError
95
+ # のみのメソッドが引っかかるので。
96
+ # (raise せずに中身が空だと IgnoreEmptyMethods でセーフ)
97
+ Lint/UnusedMethodArgument:
98
+ Enabled: false
99
+
100
+ # select 以外では引っかからないと思うので
101
+ # mutating_methods のチェックを有効に。
102
+ # TODO: select は引数が無い (ブロックのみ) の場合にだけチェックする
103
+ # ようにすると誤検知がほぼ無くなる?
104
+ Lint/Void:
105
+ CheckForMethodsWithNoSideEffects: true
106
+
107
+ #################### Metrics ###############################
108
+
109
+ # 30 まではギリギリ許せる範囲だったけど
110
+ # リリースごとに 3 ずつぐらい下げていきます。20 まで下げたい。
12
111
  Metrics/AbcSize:
13
- Max: 30
112
+ Max: 30 # Loosen for our firm.
14
113
 
114
+ # Gemfile, Guardfile は DSL 的で基本的に複雑にはならないので除外
115
+ # rake, rspec, environments, routes は巨大な block 不可避なので除外
116
+ # TODO: ExcludedMethods の精査
117
+ Metrics/BlockLength:
118
+ Exclude:
119
+ - "Rakefile"
120
+ - "**/*.rake"
121
+ - "spec/**/*.rb"
122
+ - "Gemfile"
123
+ - "Guardfile"
124
+ - "config/environments/*.rb"
125
+ - "config/routes.rb"
126
+ - "config/routes/**/*.rb"
127
+ - "*.gemspec"
128
+
129
+ # 6 は強すぎるので緩める
15
130
  Metrics/CyclomaticComplexity:
16
131
  Max: 10
17
132
 
133
+ # 20 行超えるのは migration ファイル以外滅多に無い
18
134
  Metrics/MethodLength:
19
135
  Max: 20
136
+ Exclude:
137
+ - "db/migrate/*.rb"
20
138
 
139
+ # 分岐の数。ガード句を多用しているとデフォルト 7 だと厳しい
21
140
  Metrics/PerceivedComplexity:
22
- Max: 10
141
+ Max: 10 # Loosen for our firm.
23
142
 
24
- Layout/IndentationConsistency:
25
- EnforcedStyle: normal
26
143
 
27
- Style/MethodCalledOnDoEndBlock:
144
+ #################### Naming ################################
145
+
146
+ # has_ から始まるメソッドは許可する
147
+ Naming/PredicateName:
148
+ ForbiddenPrefixes:
149
+ - "is_"
150
+ - "have_"
151
+ NamePrefix:
152
+ - "is_"
153
+ - "have_"
154
+
155
+ # 3 文字未満だと指摘されるが、未使用を示す _ や e(rror), b(lock),
156
+ # n(umber) といった 1 文字変数は頻出するし、前置詞(by, to, ...)や
157
+ # よく知られた省略語 (op: operator とか pk: primary key とか) も妥当。
158
+ # 変数 s にどんな文字列かを形容したい場合と、不要な場合とがある=無効
159
+ Naming/MethodParameterName:
160
+ Enabled: false
161
+
162
+ #################### Security ##############################
163
+
164
+ # 毎回 YAML.safe_load(yaml_str, [Date, Time]) するのは面倒で。。
165
+ Security/YAMLLoad:
28
166
  Enabled: false
29
167
 
30
- Style/StringLiterals:
31
- EnforcedStyle: single_quotes
32
168
 
33
- Style/StringLiteralsInInterpolation:
34
- EnforcedStyle: single_quotes
169
+ #################### Style #################################
170
+
171
+ # レキシカルスコープの扱いが alias_method の方が自然。
172
+ # https://ernie.io/2014/10/23/in-defense-of-alias/ のように
173
+ # 問題になる場合は自分で緩める。
174
+ Style/Alias:
175
+ EnforcedStyle: prefer_alias_method
176
+
177
+ # redirect_to xxx and return のイディオムを維持したい
178
+ Style/AndOr:
179
+ EnforcedStyle: conditionals
180
+
181
+ # 日本語のコメントを許可する
182
+ Style/AsciiComments:
183
+ Enabled: false
184
+
185
+ # do .. end から更にメソッドチェーンすると見づらいので
186
+ # auto-correct せず、自分で修正する
187
+ # spec 内は見た目が綺麗になるので許可
188
+ Style/BlockDelimiters:
189
+ AutoCorrect: false
190
+ Exclude:
191
+ - "spec/**/*_spec.rb"
192
+
193
+ # scope が違うとか親 module の存在確認が必要とかデメリットはあるが、
194
+ # namespace 付きのクラスはかなり頻繁に作るので簡単に書きたい。
195
+ Style/ClassAndModuleChildren:
196
+ Enabled: false
197
+
198
+ # Style/CollectionMethods 自体は無効になっているのだが、
199
+ # https://github.com/bbatsov/rubocop/issues/1084
200
+ # https://github.com/bbatsov/rubocop/issues/1334
201
+ # Performance/Detect がこの設定値を見るので PreferredMethods だけ変更しておく。
202
+ #
203
+ # デフォルト値から変えたのは
204
+ # find -> detect
205
+ # ActiveRecord の find と間違えやすいため
206
+ # reduce -> inject
207
+ # detect, reject, select と並べたときに韻を踏んでいるため。
208
+ # collect -> map を維持しているのは文字数が圧倒的に少ないため。
209
+ Style/CollectionMethods:
210
+ PreferredMethods:
211
+ detect: "detect"
212
+ find: "detect"
213
+ inject: "inject"
214
+ reduce: "inject"
215
+
216
+ # ドキュメントの無い public class を許可する
217
+ Style/Documentation:
218
+ Enabled: false
219
+
220
+ # !! のイディオムは積極的に使う
221
+ Style/DoubleNegation:
222
+ Enabled: false
223
+
224
+ # case
225
+ # when ios?
226
+ # when android?
227
+ # end
228
+ # のようなものは case の方が網羅の表現力が高い
229
+ Style/EmptyCaseCondition:
230
+ Enabled: false
35
231
 
232
+ # 明示的に else で nil を返すのは分かりやすいので許可する
233
+ Style/EmptyElse:
234
+ EnforcedStyle: empty
235
+
236
+ # 空メソッドの場合だけ1行で書かなければいけない理由が無い
237
+ # 「セミコロンは使わない」に寄せた方がルールがシンプル
238
+ Style/EmptyMethod:
239
+ EnforcedStyle: expanded
240
+
241
+ # いずれかに揃えるのならば `sprintf` や `format` より String#% が好きです
242
+ Style/FormatString:
243
+ EnforcedStyle: percent
244
+
245
+ # まだ対応するには早い
246
+ Style/FrozenStringLiteralComment:
247
+ Enabled: false
248
+
249
+ # if 文の中に 3 行程度のブロックを書くぐらいは許容した方が現実的
250
+ # NOTE: https://github.com/bbatsov/rubocop/commit/29945958034db13af9e8ff385ec58cb9eb464596
251
+ # の影響で、if 文の中身が 1 行の場合に警告されるようになっている。
252
+ # Style/IfUnlessModifier の設定見てくれないかなぁ? (v0.36.0)
253
+ Style/GuardClause:
254
+ MinBodyLength: 5
255
+
256
+ # rake タスクの順序の hash は rocket を許可する
257
+ Style/HashSyntax:
258
+ Exclude:
259
+ - "**/*.rake"
260
+ - "Rakefile"
261
+
262
+ # 平たくしてしまうと条件のグルーピングが脳内モデルとズレやすい
263
+ Style/IfInsideElse:
264
+ Enabled: false
265
+
266
+ # 条件式の方を意識させたい場合には後置の if/unless を使わない方が分かりやすい
267
+ Style/IfUnlessModifier:
268
+ Enabled: false
269
+
270
+ # scope 等は複数行でも lambda ではなく ->{} で揃えた方が見た目が綺麗
271
+ Style/Lambda:
272
+ EnforcedStyle: literal
273
+
274
+ # この 2 つは単発で動かすのが分かっているので Object を汚染しても問題ない。
275
+ # spec/dummy は Rails Engine を開発するときに絶対に引っかかるので入れておく。
276
+ Style/MixinUsage:
277
+ Exclude:
278
+ - "bin/setup"
279
+ - "bin/update"
280
+ - "spec/dummy/bin/setup"
281
+ - "spec/dummy/bin/update"
282
+
283
+ # 1_000_000 と区切り文字が 2 個以上必要になる場合のみ _ 区切りを必須にする
284
+ # 10_000_00 は許可しない。(これは例えば 10000 ドルをセント単位にする時に便利だが
285
+ # 頻出しないので foolproof に振る
286
+ Style/NumericLiterals:
287
+ MinDigits: 7
288
+ Strict: true
289
+
290
+ # foo.positive? は foo > 0 に比べて意味が曖昧になる
291
+ # foo.zero? は許可したいけどメソッドごとに指定できないので一括で disable に
292
+ Style/NumericPredicate:
293
+ Enabled: false
294
+
295
+ # falsy な場合という条件式の方を意識させたい場合がある。
296
+ # Style/IfUnlessModifier と同じ雰囲気。
297
+ Style/OrAssignment:
298
+ Enabled: false
299
+
300
+ # 正規表現にマッチさせた時の特殊変数の置き換えは Regex.last_match ではなく
301
+ # 名前付きキャプチャを使って参照したいので auto-correct しない
302
+ Style/PerlBackrefs:
303
+ AutoCorrect: false
304
+
305
+ # Hash#has_key? の方が key? よりも意味が通る
306
+ Style/PreferredHashMethods:
307
+ EnforcedStyle: verbose
308
+
309
+ # 受け取り側で multiple assignment しろというのを明示
310
+ Style/RedundantReturn:
311
+ AllowMultipleReturnValues: true
312
+
313
+ # 特に model 内において、ローカル変数とメソッド呼び出しの区別をつけた方が分かりやすい場合が多い
314
+ Style/RedundantSelf:
315
+ Enabled: false
316
+
317
+ # 無指定だと StandardError を rescue するのは常識の範疇なので。
318
+ Style/RescueStandardError:
319
+ EnforcedStyle: implicit
320
+
321
+ # user&.admin? が、[nil, true, false] の 3 値を返すことに一瞬で気づけず
322
+ # boolean を返すっぽく見えてしまうので無効に。
323
+ # user && user.admin? なら短絡評価で nil が返ってくるのが一目で分かるので。
324
+ # (boolean を返すメソッド以外なら積極的に使いたいんだけどねぇ
325
+ #
326
+ # 他に auto-correct してはいけないパターンとして
327
+ # if hoge && hoge.count > 1
328
+ # がある。
329
+ Style/SafeNavigation:
330
+ Enabled: false
331
+
332
+ # spec 内は見た目が綺麗になるので許可
333
+ Style/Semicolon:
334
+ Exclude:
335
+ - "spec/**/*_spec.rb"
336
+
337
+ # String#intern は ruby の内部表現すぎるので String#to_sym を使う
338
+ Style/StringMethods:
339
+ Enabled: true
340
+
341
+ # %w() と %i() が見分けづらいので Style/WordArray と合わせて無効に。
342
+ # 書き手に委ねるという意味で、Enabled: false にしています。使っても良い。
343
+ Style/SymbolArray:
344
+ Enabled: false
345
+
346
+ # 三項演算子は分かりやすく使いたい。
347
+ # () を外さない方が条件式が何なのか読み取りやすいと感じる。
348
+ Style/TernaryParentheses:
349
+ EnforcedStyle: require_parentheses_when_complex
350
+
351
+ # Count on developers the handling of the trailing commas
352
+ # Make consistency with the eslint-config-codetakt.
36
353
  Style/TrailingCommaInArguments:
37
354
  Enabled: false
38
355
 
39
- Style/TrailingCommaInLiteral:
356
+ Style/TrailingCommaInArrayLiteral:
357
+ Enabled: false
358
+
359
+ Style/TrailingCommaInHashLiteral:
360
+ Enabled: false
361
+
362
+ # %w() と %i() が見分けづらいので Style/SymbolArray と合わせて無効に。
363
+ # 書き手に委ねるという意味で、Enabled: false にしています。使っても良い。
364
+ Style/WordArray:
365
+ Enabled: false
366
+
367
+ # 0 <= foo && foo < 5 のように数直線上に並べるのは
368
+ # コードを読みやすくするテクニックなので equality_operators_only に。
369
+ # Style/YodaCondition:
370
+ # # TODO: rubocop 0.63.0以降はforbid_for_equality_operators_onlyなので依存を引き上げれば有効にできる
371
+ # EnforcedStyle: forbid_for_equality_operators_only
372
+
373
+ # 条件式で arr.size > 0 が使われた時に
374
+ # if !arr.empty?
375
+ # else
376
+ # end
377
+ # に修正されるのが嫌。
378
+ # 中身を入れ替えて否定外しても良いんだけど、どちらが例外的な処理なのかが分かりづらくなる。
379
+ Style/ZeroLengthPredicate:
40
380
  Enabled: false
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
4
+
5
+ # Exit cleanly from an early interrupt
6
+ Signal.trap('INT') { exit 1 }
7
+
8
+ require 'rubocop_codetakt'
9
+
10
+ RuboCop::Codetakt::CLI.start(ARGV)
@@ -0,0 +1,4 @@
1
+ module RuboCop
2
+ module Codetakt
3
+ end
4
+ end
@@ -0,0 +1,47 @@
1
+ require 'fileutils'
2
+
3
+ module RuboCop
4
+ module Codetakt
5
+ class CLI
6
+ def self.start(args)
7
+ action_name = retrieve_command_name(args)
8
+ unless action_name
9
+ print_help
10
+ exit
11
+ end
12
+
13
+ instance = self.new
14
+ if instance.public_methods(false).include?(action_name.to_sym)
15
+ instance.__send__(action_name, args)
16
+ exit
17
+ end
18
+
19
+ puts "Could not find command #{action_name}."
20
+ print_help
21
+ exit(1)
22
+ rescue => e
23
+ puts e.message
24
+ exit(1)
25
+ end
26
+
27
+ def self.retrieve_command_name(args)
28
+ meth = args.first.to_s unless args.empty?
29
+ args.shift if meth && (meth !~ /^\-/)
30
+ end
31
+
32
+ def self.print_help
33
+ puts 'rubocop-codetakt commands:'
34
+ puts ' init - Setup .rubocop.yml'
35
+ end
36
+
37
+ CONFIG_FILE_NAME = '.rubocop.yml'.freeze
38
+ def init(args)
39
+ raise 'usage: rubocop-codetakt init' unless args.empty?
40
+
41
+ template_path = File.expand_path('../../../templates', __dir__)
42
+ puts "#{File.exist?(CONFIG_FILE_NAME) ? 'overwrite' : 'create'} #{CONFIG_FILE_NAME}"
43
+ FileUtils.copy_file(File.join(template_path, CONFIG_FILE_NAME), CONFIG_FILE_NAME)
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,5 @@
1
+ module RuboCop
2
+ module Codetakt
3
+ VERSION = '0.83.0.1'.freeze
4
+ end
5
+ end
@@ -0,0 +1,2 @@
1
+ require 'rubocop/codetakt/cli'
2
+ require 'rubocop/codetakt/version'
@@ -0,0 +1,25 @@
1
+ lib = File.expand_path('lib', __dir__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require 'rubocop/codetakt/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'rubocop-codetakt'
7
+ spec.version = RuboCop::Codetakt::VERSION
8
+ spec.authors = ['codeTakt Developers']
9
+ spec.email = ['dev@codetakt.com']
10
+
11
+ spec.summary = 'Unify the coding style of Ruby within codeTakt Inc.'
12
+ spec.description = <<-DESC
13
+ This includes the RuboCop configuration used by codeTakt. It is
14
+ for the unification and linting of coding styles.
15
+ DESC
16
+ spec.homepage = 'https://github.com/codetakt/rubocop-codetakt'
17
+ spec.license = 'MIT'
18
+
19
+ spec.files = `git ls-files -z`.split("\x0").reject {|f| f.match(%r{^(test|spec|features)/}) }
20
+ spec.bindir = 'exe'
21
+ spec.executables = spec.files.grep(%r{^exe/}) {|f| File.basename(f) }
22
+ spec.require_paths = ['lib']
23
+
24
+ spec.add_dependency 'rubocop', '~> 0.83.0'
25
+ end
@@ -0,0 +1,12 @@
1
+ inherit_gem:
2
+ rubocop-codetakt:
3
+ - "config/rubocop.yml"
4
+ # uncomment if use performance cops
5
+ # - "config/performance.yml"
6
+ # uncomment if use rails cops
7
+ # - "config/rails.yml"
8
+ # uncomment if use rspec cops
9
+ # - "config/rspec.yml"
10
+
11
+ AllCops:
12
+ TargetRubyVersion: 2.5
metadata CHANGED
@@ -1,70 +1,62 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-codetakt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.83.0.1
5
5
  platform: ruby
6
6
  authors:
7
- - codeTakt
7
+ - codeTakt Developers
8
8
  autorequire:
9
- bindir: bin
9
+ bindir: exe
10
10
  cert_chain: []
11
- date: 2018-04-06 00:00:00.000000000 Z
11
+ date: 2020-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: onkcop
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - '='
18
- - !ruby/object:Gem::Version
19
- version: 0.52.1.1
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - '='
25
- - !ruby/object:Gem::Version
26
- version: 0.52.1.1
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '1.14'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '1.14'
41
- - !ruby/object:Gem::Dependency
42
- name: rake
14
+ name: rubocop
43
15
  requirement: !ruby/object:Gem::Requirement
44
16
  requirements:
45
17
  - - "~>"
46
18
  - !ruby/object:Gem::Version
47
- version: '10.0'
48
- type: :development
19
+ version: 0.83.0
20
+ type: :runtime
49
21
  prerelease: false
50
22
  version_requirements: !ruby/object:Gem::Requirement
51
23
  requirements:
52
24
  - - "~>"
53
25
  - !ruby/object:Gem::Version
54
- version: '10.0'
55
- description: Manage and provides Ruby coding conventions to our projects.
56
- email: dev@codetakt.com
57
- executables: []
26
+ version: 0.83.0
27
+ description: |2
28
+ This includes the RuboCop configuration used by codeTakt. It is
29
+ for the unification and linting of coding styles.
30
+ email:
31
+ - dev@codetakt.com
32
+ executables:
33
+ - rubocop-codetakt
58
34
  extensions: []
59
35
  extra_rdoc_files: []
60
36
  files:
37
+ - ".gitignore"
38
+ - ".rspec"
39
+ - ".rubocop.yml"
40
+ - ".travis.yml"
61
41
  - CHANGELOG.md
62
- - LICENSE
42
+ - Gemfile
43
+ - LICENSE.txt
63
44
  - README.md
45
+ - Rakefile
46
+ - bin/console
47
+ - bin/setup
48
+ - config/performance.yml
64
49
  - config/rails.yml
65
50
  - config/rspec.yml
66
51
  - config/rubocop.yml
67
- homepage: https://github.com/codetakt/rubocop-codetakt/
52
+ - exe/rubocop-codetakt
53
+ - lib/rubocop/codetakt.rb
54
+ - lib/rubocop/codetakt/cli.rb
55
+ - lib/rubocop/codetakt/version.rb
56
+ - lib/rubocop_codetakt.rb
57
+ - rubocop-codetakt.gemspec
58
+ - templates/.rubocop.yml
59
+ homepage: https://github.com/codetakt/rubocop-codetakt
68
60
  licenses:
69
61
  - MIT
70
62
  metadata: {}
@@ -83,9 +75,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
75
  - !ruby/object:Gem::Version
84
76
  version: '0'
85
77
  requirements: []
86
- rubyforge_project:
87
- rubygems_version: 2.7.3
78
+ rubygems_version: 3.1.2
88
79
  signing_key:
89
80
  specification_version: 4
90
- summary: codeTakt's Ruby convention using RuboCop.
81
+ summary: Unify the coding style of Ruby within codeTakt Inc.
91
82
  test_files: []