rubocop-codetakt 0.82.0.0 â 0.85.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +4 -12
- data/CHANGELOG.md +25 -2
- data/Gemfile +6 -6
- data/Rakefile +2 -2
- data/bin/console +3 -3
- data/config/rspec.yml +5 -7
- data/config/rubocop.yml +21 -8
- data/exe/rubocop-codetakt +3 -3
- data/lib/rubocop/codetakt/cli.rb +9 -8
- data/lib/rubocop/codetakt/version.rb +1 -1
- data/lib/rubocop_codetakt.rb +2 -2
- data/rubocop-codetakt.gemspec +13 -13
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99b0b2dbfa491efc42fd10b008e04a0b60e82d81cd558515e3f1b2f4ca6bb1ef
|
4
|
+
data.tar.gz: 84d39918e20a3d2e71365ce670cca7046b1a2cb9050d0c0c81ae5f73b41d6658
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 428cd71860e50467b9e05a7fc5f9525c0582220d5a11ec1459d31ba8240a92e0a28df1224edbe175555fc17b53874c0f61c95f70d59a984bf8556127b2687e60
|
7
|
+
data.tar.gz: 278c4702a98046c804437db704bf027bad59fe666124aee9971142bd49845796eeb39943cb9e8812b2f9562887b9bd107efc3cc1b4530bc4a33fc678a24f914f
|
data/.rubocop.yml
CHANGED
@@ -1,12 +1,4 @@
|
|
1
|
-
|
2
|
-
rubocop
|
3
|
-
|
4
|
-
|
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"
|
data/CHANGELOG.md
CHANGED
@@ -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
|
-
*
|
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
|
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
|
7
|
-
gem
|
8
|
-
gem
|
9
|
-
gem
|
10
|
-
gem
|
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
data/bin/console
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
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
|
13
|
+
require 'irb'
|
14
14
|
IRB.start
|
data/config/rspec.yml
CHANGED
@@ -40,14 +40,12 @@ RSpec/ImplicitExpect:
|
|
40
40
|
RSpec/InstanceVariable:
|
41
41
|
Enabled: false
|
42
42
|
|
43
|
-
#
|
44
|
-
#
|
45
|
-
#
|
46
|
-
#
|
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
|
-
|
48
|
+
Enabled: false
|
51
49
|
|
52
50
|
# ĺ¤ăŤĺĺă¤ăăŚĺźăśćšăĺăăăĽăăă
|
53
51
|
# ăăšă寞蹥ăĄă˝ăăăĺźăśă ă㎠subject 䝼ĺ¤ăć¸ăăŞăăăăŤăăćšăĺšăă
|
data/config/rubocop.yml
CHANGED
@@ -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]) ăăăŽăŻé˘ĺă§ăă
|
data/exe/rubocop-codetakt
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
$LOAD_PATH.unshift File.dirname(__FILE__) +
|
3
|
+
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
|
4
4
|
|
5
5
|
# Exit cleanly from an early interrupt
|
6
|
-
Signal.trap(
|
6
|
+
Signal.trap('INT') { exit 1 }
|
7
7
|
|
8
|
-
require
|
8
|
+
require 'rubocop_codetakt'
|
9
9
|
|
10
10
|
RuboCop::Codetakt::CLI.start(ARGV)
|
data/lib/rubocop/codetakt/cli.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
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
|
34
|
-
puts
|
33
|
+
puts 'rubocop-codetakt commands:'
|
34
|
+
puts ' init - Setup .rubocop.yml'
|
35
35
|
end
|
36
36
|
|
37
|
-
CONFIG_FILE_NAME =
|
37
|
+
CONFIG_FILE_NAME = '.rubocop.yml'.freeze
|
38
38
|
def init(args)
|
39
|
-
raise
|
40
|
-
|
41
|
-
|
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
|
data/lib/rubocop_codetakt.rb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require 'rubocop/codetakt/cli'
|
2
|
+
require 'rubocop/codetakt/version'
|
data/rubocop-codetakt.gemspec
CHANGED
@@ -1,25 +1,25 @@
|
|
1
|
-
lib = File.expand_path(
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
2
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
-
require
|
3
|
+
require 'rubocop/codetakt/version'
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
|
-
spec.name =
|
6
|
+
spec.name = 'rubocop-codetakt'
|
7
7
|
spec.version = RuboCop::Codetakt::VERSION
|
8
|
-
spec.authors = [
|
9
|
-
spec.email = [
|
8
|
+
spec.authors = ['codeTakt Developers']
|
9
|
+
spec.email = ['dev@codetakt.com']
|
10
10
|
|
11
|
-
spec.summary =
|
12
|
-
spec.description = <<-
|
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
|
-
|
16
|
-
spec.homepage =
|
17
|
-
spec.license =
|
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 =
|
20
|
+
spec.bindir = 'exe'
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) {|f| File.basename(f) }
|
22
|
-
spec.require_paths = [
|
22
|
+
spec.require_paths = ['lib']
|
23
23
|
|
24
|
-
spec.add_dependency
|
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.
|
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-
|
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.
|
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.
|
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.
|