rubocop-elegant 0.0.13 → 0.0.14
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/config/default.yml +2 -2
- data/lib/rubocop/cop/elegant/no_comments.rb +2 -0
- data/rubocop-elegant.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3620bcb1fd58f208aefb372f08005c7551bbbd51c957c335105a293c56ff83b0
|
|
4
|
+
data.tar.gz: b02183fb7f7d13d097ed472f19a55918a0a9d5dc3a8e2b713d0334323b3d9088
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a3cd063438b9f2c581a9a6acae90f7ae3f9b7b2017cd9c4e7b280e11bf1377ae9bb141701bc410fa1bfb793d8b4636de0da598379355558cf49d299184491f66
|
|
7
|
+
data.tar.gz: 66bebaa301d79ef897a8c54b76d60ea7a5c937b68789d7ce00ffb652515c7b7e4d1b0cf36712b8a869d70c01ae5337e3b9b04357035c624681b94f52a2a25de4
|
data/config/default.yml
CHANGED
|
@@ -16,12 +16,12 @@ Elegant/GoodVariableName:
|
|
|
16
16
|
Description: 'Checks that variable names match the configured pattern'
|
|
17
17
|
Enabled: true
|
|
18
18
|
VersionAdded: '0.0.3'
|
|
19
|
-
Pattern: '^(@{1,2}|\$)?(the_|test_|fake_)?[a-z]{1,16}$'
|
|
19
|
+
Pattern: '^(_.*|(@{1,2}|\$)?(the_|test_|fake_)?[a-z]{1,16})$'
|
|
20
20
|
Elegant/GoodMethodName:
|
|
21
21
|
Description: 'Checks that method names match the configured pattern'
|
|
22
22
|
Enabled: true
|
|
23
23
|
VersionAdded: '0.0.3'
|
|
24
|
-
Pattern: '^((
|
|
24
|
+
Pattern: '^(((to|fake|the|with|without|on)_)?[a-z]{1,16}[!?]?|test_[a-z_]+)$'
|
|
25
25
|
|
|
26
26
|
Naming/VariableName:
|
|
27
27
|
Enabled: false
|
|
@@ -12,11 +12,13 @@ module RuboCop
|
|
|
12
12
|
MSG = 'Comment is not allowed, unless it is SPDX, magic, rubocop directive, or docblock'
|
|
13
13
|
public_constant :MSG
|
|
14
14
|
|
|
15
|
+
# rubocop:disable Elegant/GoodMethodName
|
|
15
16
|
def on_new_investigation
|
|
16
17
|
processed_source.comments.each do |comment|
|
|
17
18
|
register(comment) unless allowed?(comment)
|
|
18
19
|
end
|
|
19
20
|
end
|
|
21
|
+
# rubocop:enable Elegant/GoodMethodName
|
|
20
22
|
|
|
21
23
|
private
|
|
22
24
|
|
data/rubocop-elegant.gemspec
CHANGED
|
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
|
|
|
9
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.
|
|
12
|
+
s.version = '0.0.14'
|
|
13
13
|
s.license = 'MIT'
|
|
14
14
|
s.summary = 'Set of custom RuboCop cops for elegant Ruby coding'
|
|
15
15
|
s.description =
|