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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7603c018f4213b0937dd8e9d9f46fbc9f9a73d3909767117d49789f1b2053353
4
- data.tar.gz: '028bca585e46bc7ff579a4bed08316f83b39dc3cd4fd220fbba1778de483b46d'
3
+ metadata.gz: 6e27b86e9fc6b295312acff4637c55ebd6ff3b5018760d774fb14ba5315a47cf
4
+ data.tar.gz: 6e6b70e219166b7a3641fe7aaa6f9f1a431a6f6d7cd988490538827e3c97044d
5
5
  SHA512:
6
- metadata.gz: cb82fe2b71a4cfb346e098435c499fbab6c5f878e1015297975e9c5c4a313565e07f186611840451d70716515389101e29abc4e1132504a6f98c3652ed1dfb70
7
- data.tar.gz: a36c5bff6a6bdc9045f5cd2178fa3b29e36c6372fa07a0064f3cd7115499ae0bba389860c62256921cc2e560a4b488bbf09a3c929830a85d24fa1d51f1e37cb2
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
- $ bundle add rentacop --group development,test
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
- Add the following to the top of your `.rubocop.yml`:
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
- And run:
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 your rubocop is not installed globally
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
+
@@ -1,3 +1,3 @@
1
1
  module Rentacop
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.3'
3
3
  end
data/rentacop.yml CHANGED
@@ -30,10 +30,14 @@ Layout/HashAlignment:
30
30
  EnforcedHashRocketStyle: table
31
31
  EnforcedColonStyle: table
32
32
 
33
- # Chained methods in newlines should be indented normally
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.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-17 00:00:00.000000000 Z
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.14
48
+ rubygems_version: 3.3.26
48
49
  signing_key:
49
50
  specification_version: 4
50
51
  summary: Collection of more relaxed rubocop rules