rubocop-elegant 0.0.8 → 0.0.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0539949abeb53317287379d9fd13d4c2f672aefe830d40b8075e62c5550cda76'
4
- data.tar.gz: 890fa74b0264add82bee3d266420625e4e95c5b79109c5b61b35b7babbee8a56
3
+ metadata.gz: a1e7cbb7f9a216f6af388b39673690dc32c43b5323e3119444595311d2c23432
4
+ data.tar.gz: 431149fbe696fbdf3b4518b8974bb78fef11821356e88c6ee1a3696dd22e38fb
5
5
  SHA512:
6
- metadata.gz: 24621f1ff1a81e8ef550e61c0aa8126658a2a087afea620428850ffd554ab7e525efd1aae365967e351cf3930ce7baeaf952b13994a2b3e171722fa89d2f7383
7
- data.tar.gz: a2bde4c190887c1572c5c4500c3eb8c2f4bd5b11002dd8cce9f3931169ff4b611f413152ed90887fdb8514e766051fa59a40a662a0b4fe6aa5d572258a2f470a
6
+ metadata.gz: 976cb8a76831de48fa4ab1bec22476692bb876950dcc2fb766d7051e7234b4d00928e5a36c5ac37e13b7a36501ac60133062d2d825bc8f64770b695be38f9343
7
+ data.tar.gz: b06d9147bd791c0cacd452c08fe513846b8c4d3e610810faff16c339abbdbb4652be647b89ba96524dee4e7c9e17af9c03e88a8d5c827f75a2c0c937b77286ba
data/config/default.yml CHANGED
@@ -93,3 +93,17 @@ Metrics/CyclomaticComplexity:
93
93
  Max: 15
94
94
  Metrics/PerceivedComplexity:
95
95
  Max: 15
96
+ Style/Copyright:
97
+ Enabled: false
98
+ Lint/ConstantResolution:
99
+ Enabled: false
100
+ Style/DocumentationMethod:
101
+ Enabled: false
102
+ Bundler/GemComment:
103
+ Enabled: false
104
+ Minitest/NoTestCases:
105
+ Enabled: false
106
+ Style/ArrayFirstLast:
107
+ Enabled: false
108
+ Style/StringHashKeys:
109
+ Enabled: false
@@ -8,6 +8,7 @@ module RuboCop
8
8
  module Elegant
9
9
  class GoodMethodName < Base
10
10
  MSG = 'Method name "%<name>s" does not match the required pattern'
11
+ public_constant :MSG
11
12
 
12
13
  def on_def(node)
13
14
  check(node, node.method_name.to_s)
@@ -8,6 +8,7 @@ module RuboCop
8
8
  module Elegant
9
9
  class GoodVariableName < Base
10
10
  MSG = 'Variable name "%<name>s" does not match the required pattern'
11
+ public_constant :MSG
11
12
 
12
13
  def on_lvasgn(node)
13
14
  check(node, node.children.first.to_s)
@@ -10,6 +10,7 @@ module RuboCop
10
10
  extend AutoCorrector
11
11
 
12
12
  MSG = 'Comment is not allowed, unless it is SPDX, magic, or rubocop directive'
13
+ public_constant :MSG
13
14
 
14
15
  def on_new_investigation
15
16
  processed_source.comments.each do |comment|
@@ -10,6 +10,7 @@ module RuboCop
10
10
  extend AutoCorrector
11
11
 
12
12
  MSG = 'Empty line inside method body is not allowed'
13
+ public_constant :MSG
13
14
 
14
15
  def on_def(node)
15
16
  check(node)
@@ -31,7 +32,7 @@ module RuboCop
31
32
  def range(node)
32
33
  first = node.body.first_line
33
34
  last = node.body.last_line
34
- return nil if first == last
35
+ return if first == last
35
36
  (first..last)
36
37
  end
37
38
 
@@ -6,5 +6,6 @@
6
6
  module RuboCop
7
7
  module Elegant
8
8
  VERSION = '0.0.1'
9
+ public_constant :VERSION
9
10
  end
10
11
  end
@@ -6,10 +6,10 @@
6
6
  require 'English'
7
7
 
8
8
  Gem::Specification.new do |s|
9
- s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
9
+ s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to?(:required_rubygems_version=)
10
10
  s.required_ruby_version = '>=2.2'
11
11
  s.name = 'rubocop-elegant'
12
- s.version = '0.0.8'
12
+ s.version = '0.0.9'
13
13
  s.license = 'MIT'
14
14
  s.summary = 'Set of custom RuboCop cops for elegant Ruby coding'
15
15
  s.description =
@@ -22,6 +22,6 @@ Gem::Specification.new do |s|
22
22
  s.extra_rdoc_files = ['README.md']
23
23
  s.metadata['rubygems_mfa_required'] = 'true'
24
24
  s.metadata['default_lint_roller_plugin'] = 'RuboCop::Elegant::Plugin'
25
- s.add_dependency 'lint_roller', '~> 1.1'
26
- s.add_dependency 'rubocop', '~> 1.75'
25
+ s.add_dependency('lint_roller', '~> 1.1')
26
+ s.add_dependency('rubocop', '~> 1.75')
27
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-elegant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko