rentacop 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +57 -4
- data/lib/rentacop/version.rb +1 -1
- data/rentacop.yml +14 -1
- data/rspec.yml +44 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e27b86e9fc6b295312acff4637c55ebd6ff3b5018760d774fb14ba5315a47cf
|
4
|
+
data.tar.gz: 6e6b70e219166b7a3641fe7aaa6f9f1a431a6f6d7cd988490538827e3c97044d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2149bcb96132f959cdc7884c3d3ae1e7adc9962387971e46be57a7c36301f3c14524f4ad92b1faa4833f12087b69229a97cb7802e2f0c8a5e3893806f64a79db
|
7
|
+
data.tar.gz: 7ebd1f4e370b9e5a37053fd1cb95997d5a2e0b5c3c577ad0b20412f3a4a933007797999799fc942b9b67bf7856b6222f68735aad61cff05e19f27628172ce524
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ A more relaxed default set of RuboCop rules.
|
|
7
7
|
Run:
|
8
8
|
|
9
9
|
```bash
|
10
|
-
$
|
10
|
+
$ gem install rentacop
|
11
11
|
```
|
12
12
|
|
13
13
|
Or, add this line to your Gemfile:
|
@@ -34,17 +34,70 @@ $ bundle add rubocop --group development,test
|
|
34
34
|
|
35
35
|
## Usage
|
36
36
|
|
37
|
-
|
37
|
+
This gem contains two rule sets:
|
38
|
+
|
39
|
+
1. Global rubocop rules in [rentacop.yml](rentacop.yml)
|
40
|
+
2. RSpec rubocop rules in [rspec.yml](rspec.yml)
|
41
|
+
|
42
|
+
### Configuring `.rubocop.yml`
|
43
|
+
|
44
|
+
If you are not using RSpec, add the following to the top of your `.rubocop.yml`:
|
45
|
+
|
38
46
|
|
39
47
|
```yaml
|
40
48
|
inherit_gem:
|
41
49
|
rentacop: rentacop.yml
|
42
50
|
```
|
43
51
|
|
44
|
-
|
52
|
+
If you are using [rubocop-rspec](https://github.com/rubocop/rubocop-rspec), and wish to include the RSpec rules from this repository, add this instead:
|
53
|
+
|
54
|
+
```yaml
|
55
|
+
require: rubocop-rspec
|
56
|
+
|
57
|
+
inherit_gem:
|
58
|
+
rentatop:
|
59
|
+
- rentacop.yml
|
60
|
+
- rspec.yml
|
61
|
+
```
|
62
|
+
|
63
|
+
### Recommended Template
|
64
|
+
|
65
|
+
This `.rubocop.yml` contains our full recommended configuration:
|
66
|
+
|
67
|
+
|
68
|
+
```yaml
|
69
|
+
# .rubocop.yml
|
70
|
+
require:
|
71
|
+
- rubocop-performance
|
72
|
+
- rubocop-rspec
|
73
|
+
|
74
|
+
inherit_gem:
|
75
|
+
rentacop:
|
76
|
+
- rentacop.yml
|
77
|
+
- rspec.yml
|
78
|
+
|
79
|
+
inherit_mode:
|
80
|
+
merge:
|
81
|
+
- Exclude
|
82
|
+
- Include
|
83
|
+
|
84
|
+
AllCops:
|
85
|
+
TargetRubyVersion: 2.7
|
86
|
+
```
|
87
|
+
|
88
|
+
### Running `rubocop`
|
89
|
+
|
90
|
+
After creating your `.rubocop.yml` file, run:
|
45
91
|
|
46
92
|
```bash
|
47
93
|
$ rubocop
|
48
|
-
# or, if
|
94
|
+
# or, if you do not have rubocop installed globally
|
49
95
|
$ bundle exec rubocop
|
50
96
|
```
|
97
|
+
|
98
|
+
To create a todo list, run:
|
99
|
+
|
100
|
+
```bash
|
101
|
+
$ rubocop --regenerate-todo
|
102
|
+
```
|
103
|
+
|
data/lib/rentacop/version.rb
CHANGED
data/rentacop.yml
CHANGED
@@ -30,10 +30,14 @@ Layout/HashAlignment:
|
|
30
30
|
EnforcedHashRocketStyle: table
|
31
31
|
EnforcedColonStyle: table
|
32
32
|
|
33
|
-
# Chained methods in
|
33
|
+
# Chained methods in multiple lines should be indented normally
|
34
34
|
Layout/MultilineMethodCallIndentation:
|
35
35
|
EnforcedStyle: indented
|
36
36
|
|
37
|
+
# Multiline operations in multiple lines should be indented normally
|
38
|
+
Layout/MultilineOperationIndentation:
|
39
|
+
EnforcedStyle: indented
|
40
|
+
|
37
41
|
|
38
42
|
# === Lint ===
|
39
43
|
|
@@ -41,6 +45,10 @@ Layout/MultilineMethodCallIndentation:
|
|
41
45
|
Lint/MissingSuper:
|
42
46
|
Enabled: false
|
43
47
|
|
48
|
+
# `FileUtils` methods do not behave properly on Vagrant
|
49
|
+
Lint/NonAtomicFileOperation:
|
50
|
+
Enabled: false
|
51
|
+
|
44
52
|
|
45
53
|
# === Metrics ===
|
46
54
|
|
@@ -104,6 +112,10 @@ Style/ClassAndModuleChildren:
|
|
104
112
|
Style/Documentation:
|
105
113
|
Enabled: false
|
106
114
|
|
115
|
+
# Do not require comments for `eval`
|
116
|
+
Style/DocumentDynamicEvalDefinition:
|
117
|
+
Enabled: false
|
118
|
+
|
107
119
|
# Allow the use of `ENV['name']`
|
108
120
|
Style/FetchEnvVar:
|
109
121
|
Enabled: false
|
@@ -185,3 +197,4 @@ Style/TrailingCommaInArrayLiteral:
|
|
185
197
|
# Prefer multi-line hashes to end with a comma for easy alteration
|
186
198
|
Style/TrailingCommaInHashLiteral:
|
187
199
|
EnforcedStyleForMultiline: comma
|
200
|
+
|
data/rspec.yml
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
# Allow `before :all` and `after :all`
|
2
|
+
RSpec/BeforeAfterAll:
|
3
|
+
Enabled: false
|
4
|
+
|
5
|
+
# Allow the first `describe` to be arbitrary
|
6
|
+
RSpec/DescribeClass:
|
7
|
+
Enabled: false
|
8
|
+
|
9
|
+
# Allow longer tests
|
10
|
+
RSpec/ExampleLength:
|
11
|
+
Max: 8
|
12
|
+
|
13
|
+
# Allow `expect` in `before` hook, it is used as a utility to trap output and
|
14
|
+
# ensure state
|
15
|
+
RSpec/ExpectInHook:
|
16
|
+
Enabled: false
|
17
|
+
|
18
|
+
# Prefer `receive` over `have_received` spies
|
19
|
+
RSpec/MessageSpies:
|
20
|
+
EnforcedStyle: receive
|
21
|
+
|
22
|
+
# Allow multiple expectations
|
23
|
+
RSpec/MultipleExpectations:
|
24
|
+
Max: 5
|
25
|
+
|
26
|
+
# Allow more `let` statements per test
|
27
|
+
RSpec/MultipleMemoizedHelpers:
|
28
|
+
Max: 8
|
29
|
+
|
30
|
+
# Allow unnamed subjects
|
31
|
+
RSpec/NamedSubject:
|
32
|
+
Enabled: false
|
33
|
+
|
34
|
+
# Allow deeper nested groups
|
35
|
+
RSpec/NestedGroups:
|
36
|
+
Max: 5
|
37
|
+
|
38
|
+
# Allow stubbing inner methods of `subject`
|
39
|
+
RSpec/SubjectStub:
|
40
|
+
Enabled: false
|
41
|
+
|
42
|
+
# Allow nameless `double`
|
43
|
+
RSpec/VerifiedDoubles:
|
44
|
+
Enabled: false
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rentacop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danny Ben Shitrit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Collection of more relaxed rubocop rules
|
14
14
|
email: db@dannyben.com
|
@@ -20,6 +20,7 @@ files:
|
|
20
20
|
- README.md
|
21
21
|
- lib/rentacop/version.rb
|
22
22
|
- rentacop.yml
|
23
|
+
- rspec.yml
|
23
24
|
homepage: https://github.com/dannyben/rentacop
|
24
25
|
licenses:
|
25
26
|
- MIT
|
@@ -44,7 +45,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
44
45
|
- !ruby/object:Gem::Version
|
45
46
|
version: '0'
|
46
47
|
requirements: []
|
47
|
-
rubygems_version: 3.3.
|
48
|
+
rubygems_version: 3.3.26
|
48
49
|
signing_key:
|
49
50
|
specification_version: 4
|
50
51
|
summary: Collection of more relaxed rubocop rules
|