rubocop-elegant 0.0.3 → 0.0.4

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: a0f20207d2c2b3d6cf14c979f315a67f9be53fb7f3918fca077dc4f0f9a0e0f9
4
+ data.tar.gz: 0d5ff4a396e07cf7324b1b27084345a70b64b7d5dfd80322affdd76a6bdf5201
5
5
  SHA512:
6
- metadata.gz: fa319c503a325db12419461349d210f9b7039c988da81187dc027368fad3a5d97af72883d331a67ee5d7c895319d6be27e224f327be9d43a2c606a883805548c
7
- data.tar.gz: 860d3c05d81f9560f45e63f49dc406e9c4faed40098955c4f907edd66c9a4a326b83083c0d91630b589e19b0d58e2bf2d1d5f0f6a195b2317966d529e105e1e1
6
+ metadata.gz: 2066b22308c7a0bb6cf85684a808bd401ee295489d481afefc29410471bdd8f3ba241d4c03b633a50a06cda324720948384e8d77016f74d8a43840183d829314
7
+ data.tar.gz: fd83e920a8c1ea5946b89cdad32979e5d0bceaf256a603749c9c496374f7df80c643488caaeadd27e6c5b02dfaf244507a9f344f5be26df70446ca4b47b3830c
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,68 @@ 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
+ Metrics/MethodLength:
21
+ Max: 80
22
+ Metrics/AbcSize:
23
+ Max: 25
24
+ Naming/MethodName:
25
+ ForbiddenPatterns:
26
+ - '[^a-z!?]'
27
+ - '^.{17,}$'
28
+ Style/IfUnlessModifier:
29
+ Enabled: false
30
+ Naming/FileName:
31
+ Regex: '^[a-z0-9\-._]*$'
32
+ Minitest/EmptyLineBeforeAssertionMethods:
33
+ Enabled: false
34
+ Layout/EmptyLineAfterGuardClause:
35
+ Enabled: false
36
+ Layout/RescueEnsureAlignment:
37
+ Enabled: false
38
+ Layout/MultilineMethodCallIndentation:
39
+ Enabled: false
40
+ Layout/EndOfLine:
41
+ EnforcedStyle: lf
42
+ Layout/ParameterAlignment:
43
+ Enabled: false
44
+ Layout/LineLength:
45
+ Max: 120
46
+ Style/MultilineBlockChain:
47
+ Enabled: false
48
+ Style/ClassAndModuleChildren:
49
+ Enabled: false
50
+ Lint/NestedMethodDefinition:
51
+ Enabled: false
52
+ Metrics/ParameterLists:
53
+ Enabled: false
54
+ Layout/MultilineAssignmentLayout:
55
+ Enabled: true
56
+ Style/Documentation:
57
+ Enabled: false
58
+ Style/ClassVars:
59
+ Enabled: false
60
+ Style/RequireOrder:
61
+ Enabled: true
62
+ Style/AutoResourceCleanup:
63
+ Enabled: true
64
+ Style/Send:
65
+ Enabled: true
66
+ Style/StaticClass:
67
+ Enabled: true
68
+ Style/TopLevelMethodDefinition:
69
+ Enabled: true
70
+ Style/ImplicitRuntimeError:
71
+ Enabled: true
72
+ Style/DateTime:
73
+ Enabled: true
74
+ Lint/NumberConversion:
75
+ Enabled: true
76
+ Performance/ChainArrayAllocation:
77
+ Enabled: true
78
+ Performance/OpenStruct:
79
+ 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.4'
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.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko