rubocop-codetakt 0.82.0.0 → 0.85.0.0

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: 9ce6c7a74ef3e10599646185d4cdb5f24e9b7c28a642dab9fcd991320eb0a266
4
- data.tar.gz: 9c5ba3dc1a0cb4ee4a3573fc3d94ad0f18dcbf5b0920690a6335cb57604e3bd2
3
+ metadata.gz: 99b0b2dbfa491efc42fd10b008e04a0b60e82d81cd558515e3f1b2f4ca6bb1ef
4
+ data.tar.gz: 84d39918e20a3d2e71365ce670cca7046b1a2cb9050d0c0c81ae5f73b41d6658
5
5
  SHA512:
6
- metadata.gz: 758dda084a7a4ee3463c853642c706fea238a7375c936b5ca36cc2a2a3661df1d87bb37442dae25509c13558cc4844fc8a2d45f62489b6f2818f7958041cfe9a
7
- data.tar.gz: c1941541ff7a5b8a3f605e3de6732ddad53f55e6a171e548b4da5ad809afb478f456370ac458ba765e4d249314473e8ff82bd180ba7e66f75b3364a6532c6ac9
6
+ metadata.gz: 428cd71860e50467b9e05a7fc5f9525c0582220d5a11ec1459d31ba8240a92e0a28df1224edbe175555fc17b53874c0f61c95f70d59a984bf8556127b2687e60
7
+ data.tar.gz: 278c4702a98046c804437db704bf027bad59fe666124aee9971142bd49845796eeb39943cb9e8812b2f9562887b9bd107efc3cc1b4530bc4a33fc678a24f914f
@@ -1,12 +1,4 @@
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
1
+ inherit_from:
2
+ - "config/rubocop.yml"
3
+ - "config/performance.yml"
4
+ - "config/rspec.yml"
@@ -1,13 +1,36 @@
1
1
  # rubocop-codetakt:
2
2
 
3
+ ## v0.85.0.0 (2020-06-04)
4
+
5
+ * Update `rubocop` v0.85.0
6
+
7
+ ## v0.84.0.0 (2020-06-04)
8
+
9
+ * Update `rubocop` v0.84.0, `rubocop-rspec` v1.39.0, `rubocop-rails` v2.5.0 and `rubocop-performance` v1.6.0
10
+ * Clarify `Layout/HashAlignment` cop option
11
+
12
+ ## v0.83.0.1 (2020-06-03)
13
+
14
+ * Disable `RSpec/MultipleExpectations:` cop
15
+
16
+ ## v0.83.0.0 (2020-05-18)
17
+
18
+ * Update `rubocop` v0.83.0
19
+
20
+ ## v0.82.0.1 (2020-06-01)
21
+
22
+ * Make the code in this repository to no offenses
23
+ * Accept the default setting of new cops
24
+
3
25
  ## v0.82.0.0 (2020-04-20)
4
26
 
5
27
  * Fork from onk/onkcop to codetakt/rubocop-codetakt
28
+ * Update `rubocop` v0.82.0, `rubocop-rspec` v1.38.0, `rubocop-rails` v2.5.0 and `rubocop-performance` v1.5.0
6
29
  * Follow upstream renamings
7
30
  * Separate the file of performance settings
8
31
  * Clarify requiring the `rubocop-rails` gem in the Rails settings file
9
32
  * Refine dependency settings
10
- * Remove `Layout/DotPosition` cop'
33
+ * Remove `Layout/DotPosition` cop
11
34
  * Remove `Layout/IndentationConsistency` cop
12
35
  * Remove `Style/BracesAroundHashParameters` cop
13
36
  * Remove `Style/MethodCalledOnDoEndBlock`
@@ -65,7 +88,7 @@
65
88
  * Update `rubocop` v0.52.0 and `rubocop-rspec` v1.21.0
66
89
  * Remove `DisplayCopNames` configuration
67
90
  * Enable new `Style/ClassStructure` cop
68
- * Disalbe `Style/FormatStringToken` cop
91
+ * Disable `Style/FormatStringToken` cop
69
92
  * Change `Layout/SpaceBeforeBlockBraces` cop's empty braces style to `space`
70
93
  * Change `Style/RescueStandardError` cop to implicit style
71
94
  * Change `RSpec/MultipleExpectations` cop to `AggregateFailuresByDefault` style
data/Gemfile CHANGED
@@ -1,10 +1,10 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in rubocop-codetakt.gemspec
4
4
  gemspec
5
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"
6
+ gem 'rake', '~> 13.0'
7
+ gem 'rspec', '~> 3.0'
8
+ gem 'rubocop-performance', '~> 1.6.0'
9
+ gem 'rubocop-rails', '~> 2.5.0'
10
+ gem 'rubocop-rspec', '~> 1.39.0'
data/Rakefile CHANGED
@@ -1,4 +1,4 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
3
  RSpec::Core::RakeTask.new(:rspec)
4
4
  task :default => [:rspec]
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require "bundler/setup"
4
- require "rubocop_codetakt"
3
+ require 'bundler/setup'
4
+ require 'rubocop_codetakt'
5
5
 
6
6
  # You can add fixtures and/or initialization code here to make experimenting
7
7
  # with your gem easier. You can also use a different console, if you like.
@@ -10,5 +10,5 @@ require "rubocop_codetakt"
10
10
  # require "pry"
11
11
  # Pry.start
12
12
 
13
- require "irb"
13
+ require 'irb'
14
14
  IRB.start
@@ -40,14 +40,12 @@ RSpec/ImplicitExpect:
40
40
  RSpec/InstanceVariable:
41
41
  Enabled: false
42
42
 
43
- # spec_helper で meta[:aggregate_failures] を設定することで
44
- # aggregate_failures が全ての spec で有効になる。
45
- #
46
- # ほぼ MultipleExpectations についてはチェックされなくなる設定なので注意。
47
- # パフォーマンスの問題さえ無ければ 1 example 1 assertion にしておく方が
48
- # 読みやすいテストになりやすいので、そこはレビューで担保していく必要がある。
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にする
49
47
  RSpec/MultipleExpectations:
50
- AggregateFailuresByDefault: true
48
+ Enabled: false
51
49
 
52
50
  # 変に名前つけて呼ぶ方が分かりづらい。
53
51
  # テスト対象メソッドを呼ぶだけの subject 以外を書かないようにする方が効く。
@@ -1,5 +1,9 @@
1
- # 自動生成されるものはチェック対象から除外する
2
1
  AllCops:
2
+ # We accept the default setting of rookie cops.
3
+ # https://docs.rubocop.org/rubocop/versioning.html
4
+ NewCops: enable
5
+
6
+ # Exclude automatically generated files.
3
7
  Exclude:
4
8
  - "node_modules/**/*" # rubocop config/default.yml
5
9
  - "vendor/**/*" # rubocop config/default.yml
@@ -31,6 +35,15 @@ Layout/FirstArrayElementIndentation:
31
35
  Layout/FirstHashElementIndentation:
32
36
  EnforcedStyle: consistent
33
37
 
38
+ # We have decided to accept the default options of this cop (as of
39
+ # RuboCop v0.83.0.) These are certainly useful in many situations.
40
+ # However, any product team has the discretion to locally disable this
41
+ # cop.
42
+ Layout/HashAlignment:
43
+ EnforcedHashRocketStyle: key
44
+ EnforcedColonStyle: key
45
+ EnforcedLastArgumentHashStyle: always_inspect
46
+
34
47
  # * 警告 120文字
35
48
  # * 猁止 160文字
36
49
  # のイメージ
@@ -139,6 +152,13 @@ Metrics/PerceivedComplexity:
139
152
 
140
153
  #################### Naming ################################
141
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
+
142
162
  # has_ から始まるメソッドは許可する
143
163
  Naming/PredicateName:
144
164
  ForbiddenPrefixes:
@@ -148,13 +168,6 @@ Naming/PredicateName:
148
168
  - "is_"
149
169
  - "have_"
150
170
 
151
- # 3 文字未満だと指摘されるが、未使用を示す _ や e(rror), b(lock),
152
- # n(umber) といった 1 文字変数は頻出するし、前置詞(by, to, ...)や
153
- # よく知られた省略語 (op: operator とか pk: primary key とか) も妥当。
154
- # 変数 s にどんな文字列かを形容したい場合と、不要な場合とがある=無効
155
- Naming/MethodParameterName:
156
- Enabled: false
157
-
158
171
  #################### Security ##############################
159
172
 
160
173
  # 毎回 YAML.safe_load(yaml_str, [Date, Time]) するのは面倒で。。
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- $LOAD_PATH.unshift File.dirname(__FILE__) + "/../lib"
3
+ $LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
4
4
 
5
5
  # Exit cleanly from an early interrupt
6
- Signal.trap("INT") { exit 1 }
6
+ Signal.trap('INT') { exit 1 }
7
7
 
8
- require "rubocop_codetakt"
8
+ require 'rubocop_codetakt'
9
9
 
10
10
  RuboCop::Codetakt::CLI.start(ARGV)
@@ -1,4 +1,4 @@
1
- require "fileutils"
1
+ require 'fileutils'
2
2
 
3
3
  module RuboCop
4
4
  module Codetakt
@@ -26,19 +26,20 @@ module RuboCop
26
26
 
27
27
  def self.retrieve_command_name(args)
28
28
  meth = args.first.to_s unless args.empty?
29
- args.shift if meth && (meth !~ /^\-/)
29
+ args.shift if meth && (meth !~ /^-/)
30
30
  end
31
31
 
32
32
  def self.print_help
33
- puts "rubocop-codetakt commands:"
34
- puts " init - Setup .rubocop.yml"
33
+ puts 'rubocop-codetakt commands:'
34
+ puts ' init - Setup .rubocop.yml'
35
35
  end
36
36
 
37
- CONFIG_FILE_NAME = ".rubocop.yml"
37
+ CONFIG_FILE_NAME = '.rubocop.yml'.freeze
38
38
  def init(args)
39
- raise "usage: rubocop-codetakt init" unless args.empty?
40
- template_path = File.expand_path("../../../templates", __dir__)
41
- puts "#{File.exist?(CONFIG_FILE_NAME) ? "overwrite" : "create"} #{CONFIG_FILE_NAME}"
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}"
42
43
  FileUtils.copy_file(File.join(template_path, CONFIG_FILE_NAME), CONFIG_FILE_NAME)
43
44
  end
44
45
  end
@@ -1,5 +1,5 @@
1
1
  module RuboCop
2
2
  module Codetakt
3
- VERSION = "0.82.0.0"
3
+ VERSION = '0.85.0.0'.freeze
4
4
  end
5
5
  end
@@ -1,2 +1,2 @@
1
- require "rubocop/codetakt/cli"
2
- require "rubocop/codetakt/version"
1
+ require 'rubocop/codetakt/cli'
2
+ require 'rubocop/codetakt/version'
@@ -1,25 +1,25 @@
1
- lib = File.expand_path("lib", __dir__)
1
+ lib = File.expand_path('lib', __dir__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require "rubocop/codetakt/version"
3
+ require 'rubocop/codetakt/version'
4
4
 
5
5
  Gem::Specification.new do |spec|
6
- spec.name = "rubocop-codetakt"
6
+ spec.name = 'rubocop-codetakt'
7
7
  spec.version = RuboCop::Codetakt::VERSION
8
- spec.authors = ["codeTakt Developers"]
9
- spec.email = ["dev@codetakt.com"]
8
+ spec.authors = ['codeTakt Developers']
9
+ spec.email = ['dev@codetakt.com']
10
10
 
11
- spec.summary = "Unify the coding style of Ruby within codeTakt Inc."
12
- spec.description = <<-EOF
11
+ spec.summary = 'Unify the coding style of Ruby within codeTakt Inc.'
12
+ spec.description = <<-DESC
13
13
  This includes the RuboCop configuration used by codeTakt. It is
14
14
  for the unification and linting of coding styles.
15
- EOF
16
- spec.homepage = "https://github.com/codetakt/rubocop-codetakt"
17
- spec.license = "MIT"
15
+ DESC
16
+ spec.homepage = 'https://github.com/codetakt/rubocop-codetakt'
17
+ spec.license = 'MIT'
18
18
 
19
19
  spec.files = `git ls-files -z`.split("\x0").reject {|f| f.match(%r{^(test|spec|features)/}) }
20
- spec.bindir = "exe"
20
+ spec.bindir = 'exe'
21
21
  spec.executables = spec.files.grep(%r{^exe/}) {|f| File.basename(f) }
22
- spec.require_paths = ["lib"]
22
+ spec.require_paths = ['lib']
23
23
 
24
- spec.add_dependency "rubocop", "~> 0.82.0"
24
+ spec.add_dependency 'rubocop', '~> 0.85.0'
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-codetakt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.82.0.0
4
+ version: 0.85.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - codeTakt Developers
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-20 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
14
  name: rubocop
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.82.0
19
+ version: 0.85.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.82.0
26
+ version: 0.85.0
27
27
  description: |2
28
28
  This includes the RuboCop configuration used by codeTakt. It is
29
29
  for the unification and linting of coding styles.