rubocop-elegant 0.0.3 → 0.0.5

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: 241a20dbc086ba4e29a5f1b694ff4e044adf15097b4e6669616c911803d6a5cb
4
- data.tar.gz: 331c440951cbf56be3dbacbf605f98e71a0c00964afe0d00c8829e6b961878b5
3
+ metadata.gz: be534aa069656462543775b939711e3b48cf391f9beecefa0e94917307c00607
4
+ data.tar.gz: f8c65744ddda0476090724184262517f073b73188e5848875bb2c937b87e51f5
5
5
  SHA512:
6
- metadata.gz: fa319c503a325db12419461349d210f9b7039c988da81187dc027368fad3a5d97af72883d331a67ee5d7c895319d6be27e224f327be9d43a2c606a883805548c
7
- data.tar.gz: 860d3c05d81f9560f45e63f49dc406e9c4faed40098955c4f907edd66c9a4a326b83083c0d91630b589e19b0d58e2bf2d1d5f0f6a195b2317966d529e105e1e1
6
+ metadata.gz: c5efff7dbb70560c2c1d827b54593cfa704c2d95d7b217f44ff93562b9f13bbff6f1e9d7c27be3897194384010648749eb4579405c3f15d17d058e0cd9ab71ef
7
+ data.tar.gz: c290e3ed64631e369ee29f4e17dd0bee7f4a581e8811e219c60d603901c0238ace8c43233d236dc7571cbdec7611b6cd67d5c7f61f32217f2e7c6b1f1c232358
data/README.md CHANGED
@@ -11,6 +11,14 @@
11
11
  [![Test Coverage](https://img.shields.io/codecov/c/github/yegor256/rubocop-elegant.svg)](https://codecov.io/github/yegor256/rubocop-elegant?branch=master)
12
12
  [![Hits-of-Code](https://hitsofcode.com/github/yegor256/rubocop-elegant)](https://hitsofcode.com/view/github/yegor256/rubocop-elegant)
13
13
 
14
+ This is a [RuboCop] plugin that enforces
15
+ [Elegant Objects] principles in Ruby code.
16
+ Default RuboCop configuration is too permissive, allowing coding practices
17
+ that lead to unmaintainable code: comments that lie, verbose methods,
18
+ cryptic variable names, and so on.
19
+ This plugin configures existing RuboCop cops with stricter settings
20
+ and adds custom cops for rules that RuboCop doesn't provide out of the box.
21
+
14
22
  First, install it:
15
23
 
16
24
  ```bash
@@ -42,5 +50,5 @@ bundle exec rake
42
50
 
43
51
  If it's clean and you don't see any error messages, submit your pull request.
44
52
 
45
- [rubocop-elegant]: https://www.rubydoc.info/github/yegor256/rubocop-elegant/master/rubocop-elegant
46
- [fluent interface]: https://en.wikipedia.org/wiki/Fluent_interface
53
+ [RuboCop]: https://rubocop.org/
54
+ [Elegant Objects]: https://www.elegantobjects.org/
data/config/default.yml CHANGED
@@ -12,3 +12,75 @@ Elegant/NoEmptyLinesInMethods:
12
12
  Description: 'Disallows empty lines inside method bodies'
13
13
  Enabled: true
14
14
  VersionAdded: '0.0.2'
15
+
16
+ Naming/VariableName:
17
+ ForbiddenPatterns:
18
+ - '[^a-z]'
19
+ - '^.{17,}$'
20
+ AllowedPatterns:
21
+ - '^(@|\$|the_|test_|fake_)[a-z]{1,16}$'
22
+ Metrics/MethodLength:
23
+ Max: 100
24
+ Metrics/ClassLength:
25
+ Max: 300
26
+ Metrics/AbcSize:
27
+ Max: 25
28
+ Naming/MethodName:
29
+ ForbiddenPatterns:
30
+ - '[^a-z!?]'
31
+ - '^.{17,}$'
32
+ AllowedPatterns:
33
+ - '^test_'
34
+ - '^fake_'
35
+ Style/IfUnlessModifier:
36
+ Enabled: false
37
+ Naming/FileName:
38
+ Regex: '^[a-z0-9\-._]*$'
39
+ Minitest/EmptyLineBeforeAssertionMethods:
40
+ Enabled: false
41
+ Layout/EmptyLineAfterGuardClause:
42
+ Enabled: false
43
+ Layout/RescueEnsureAlignment:
44
+ Enabled: false
45
+ Layout/MultilineMethodCallIndentation:
46
+ Enabled: false
47
+ Layout/EndOfLine:
48
+ EnforcedStyle: lf
49
+ Layout/ParameterAlignment:
50
+ Enabled: false
51
+ Layout/LineLength:
52
+ Max: 120
53
+ Style/MultilineBlockChain:
54
+ Enabled: false
55
+ Style/ClassAndModuleChildren:
56
+ Enabled: false
57
+ Lint/NestedMethodDefinition:
58
+ Enabled: false
59
+ Metrics/ParameterLists:
60
+ Enabled: false
61
+ Layout/MultilineAssignmentLayout:
62
+ Enabled: true
63
+ Style/Documentation:
64
+ Enabled: false
65
+ Style/ClassVars:
66
+ Enabled: false
67
+ Style/RequireOrder:
68
+ Enabled: true
69
+ Style/AutoResourceCleanup:
70
+ Enabled: true
71
+ Style/Send:
72
+ Enabled: true
73
+ Style/StaticClass:
74
+ Enabled: true
75
+ Style/TopLevelMethodDefinition:
76
+ Enabled: true
77
+ Style/ImplicitRuntimeError:
78
+ Enabled: true
79
+ Style/DateTime:
80
+ Enabled: true
81
+ Lint/NumberConversion:
82
+ Enabled: true
83
+ Performance/ChainArrayAllocation:
84
+ Enabled: true
85
+ Performance/OpenStruct:
86
+ Enabled: true
@@ -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.3'
12
+ s.version = '0.0.5'
13
13
  s.license = 'MIT'
14
14
  s.summary = 'Set of custom RuboCop cops for elegant Ruby coding'
15
15
  s.description =
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.3
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko