rentacop 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +50 -0
  4. data/lib/rentacop/version.rb +3 -0
  5. data/rentacop.yml +172 -0
  6. metadata +51 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 60d93aa394189dda601036339b531325c3af87d4e62b73df1730bb8e351f8e79
4
+ data.tar.gz: 25c2dbe09f6ff61a6b67ba3c7fbd6b5261aa81713b90ac2810e5f5ffe5fe8f19
5
+ SHA512:
6
+ metadata.gz: ffbc18d465abe1148498893911b136078db3645f99a6d1843b19a690c504f0d202d0d6171a66a48ccb978b6b309fdd1dbfd96dcca66bbecd66ac1171b557442c
7
+ data.tar.gz: 22b743115948e9a4b520c5e91760e623b9c63c88c5c9e8a9768b7c22df9d1c7130c246a4f8b0e0b0b7415b62a0fdff6bcc45ad29accc5df9699d5fec515a6f47
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) Danny Ben Shitrit
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # Rentacop
2
+
3
+ A more relaxed default set of RuboCop rules.
4
+
5
+ ## Install
6
+
7
+ Run:
8
+
9
+ ```bash
10
+ $ bundle add rentacop --group development,test
11
+ ```
12
+
13
+ Or, add this line to your Gemfile:
14
+
15
+ ```ruby
16
+ group :test, :development do
17
+ gem "rentacop"
18
+ end
19
+ ```
20
+
21
+ ## Prerequisites
22
+
23
+ We assume you have rubocop installed either globally:
24
+
25
+ ```bash
26
+ $ gem install rubocop
27
+ ```
28
+
29
+ or in your bundle
30
+
31
+ ```bash
32
+ $ bundle add rubocop --group development,test
33
+ ```
34
+
35
+ ## Usage
36
+
37
+ Add the following to the top of your `.rubocop.yml`:
38
+
39
+ ```yaml
40
+ inherit_gem:
41
+ rentacop: rentacop.yml
42
+ ```
43
+
44
+ And run:
45
+
46
+ ```bash
47
+ $ rubocop
48
+ # or, if your rubocop is not installed globally
49
+ $ bundle exec rubocop
50
+ ```
@@ -0,0 +1,3 @@
1
+ module Rentacop
2
+ VERSION = '0.0.1'
3
+ end
data/rentacop.yml ADDED
@@ -0,0 +1,172 @@
1
+ # RentaCop Configuration for RuboCop
2
+
3
+ AllCops:
4
+ NewCops: enable
5
+ TargetRubyVersion: 2.6
6
+ Exclude:
7
+ - 'spec/approvals/**/*'
8
+
9
+
10
+ # === Layout ===
11
+
12
+ # Prefer outdented `private` and `protected`
13
+ Layout/AccessModifierIndentation:
14
+ EnforcedStyle: outdent
15
+
16
+ # Align multiline arguments normally
17
+ Layout/ArgumentAlignment:
18
+ EnforcedStyle: with_fixed_indentation
19
+
20
+ # Align `when` with `end` in `case`
21
+ Layout/CaseIndentation:
22
+ EnforcedStyle: end
23
+
24
+ # Indent `end` to the line that started it
25
+ Layout/EndAlignment:
26
+ EnforcedStyleAlignWith: start_of_line
27
+
28
+ # Align hash keys and values as a table
29
+ Layout/HashAlignment:
30
+ EnforcedHashRocketStyle: table
31
+ EnforcedColonStyle: table
32
+
33
+ # Chained methods in newlines should be indented normally
34
+ Layout/MultilineMethodCallIndentation:
35
+ EnforcedStyle: indented
36
+
37
+
38
+ # === Lint ===
39
+
40
+ # Not all inheriting classes need to call `super` in their constructor
41
+ Lint/MissingSuper:
42
+ Enabled: false
43
+
44
+
45
+ # === Metrics ===
46
+
47
+ # Allow some complexity
48
+ Metrics/AbcSize:
49
+ Max: 30
50
+
51
+ # Blocks in specs are long by design
52
+ Metrics/BlockLength:
53
+ Exclude:
54
+ - spec/**/*_spec.rb
55
+
56
+ # Allow some longer classes
57
+ Metrics/ClassLength:
58
+ Max: 200
59
+
60
+ # Allow some complexity
61
+ Metrics/CyclomaticComplexity:
62
+ Max: 10
63
+
64
+ # Allow somewhat longer methods
65
+ Metrics/MethodLength:
66
+ Max: 25
67
+
68
+ # Allow some complexity
69
+ Metrics/PerceivedComplexity:
70
+ Max: 10
71
+
72
+
73
+ # === Naming ===
74
+
75
+ # Allow any method parameter name
76
+ Naming/MethodParameterName:
77
+ Enabled: false
78
+
79
+ # Allow `has_`, `is_` prefixes
80
+ Naming/PredicateName:
81
+ Enabled: false
82
+
83
+
84
+ # === Security ===
85
+
86
+ # `YAML.safe_load` is restrictive, we do not use it
87
+ Security/YAMLLoad:
88
+ Enabled: false
89
+
90
+
91
+ # === Style ===
92
+
93
+ # Allow `module Module::Class`
94
+ Style/ClassAndModuleChildren:
95
+ Enabled: false
96
+
97
+ # Good code does not need comments to describe it
98
+ Style/Documentation:
99
+ Enabled: false
100
+
101
+ # Allow the use of `ENV['name']`
102
+ Style/FetchEnvVar:
103
+ Enabled: false
104
+
105
+ # Prefer `str % ...` as a string formatting utility
106
+ Style/FormatString:
107
+ EnforcedStyle: percent
108
+
109
+ # Allow named or unnamed tokens in strings
110
+ Style/FormatStringToken:
111
+ Enabled: false
112
+
113
+ # Frozen string literals are not needed in ruby >= 3
114
+ Style/FrozenStringLiteralComment:
115
+ Enabled: false
116
+
117
+ # Avoid hash rocket syntax where appropriate (EnforcedStyle)
118
+ # Avoid value-less hash shorthand since it is ruby >= 3.1 (EnforcedShorthandSyntax)
119
+ Style/HashSyntax:
120
+ EnforcedStyle: ruby19_no_mixed_keys
121
+ EnforcedShorthandSyntax: never
122
+
123
+ # Allow non one-line conditions even when the body of the condition is one line
124
+ Style/IfUnlessModifier:
125
+ Enabled: false
126
+
127
+ # Allow top level `include` in some places
128
+ Style/MixinUsage:
129
+ Exclude:
130
+ - 'bin/*'
131
+ - 'spec/spec_helper.rb'
132
+
133
+ # Allow unfrozen literals
134
+ Style/MutableConstant:
135
+ Enabled: false
136
+
137
+ # Allow nested methods to be written without parentheses
138
+ Style/NestedParenthesizedCalls:
139
+ Enabled: false
140
+
141
+ # Allow the use of OpenStruct
142
+ Style/OpenStructUse:
143
+ Enabled: false
144
+
145
+ # Prefer `%[]` percent literals
146
+ Style/PercentLiteralDelimiters:
147
+ PreferredDelimiters:
148
+ default: '[]'
149
+
150
+ # Allow perl-style regex back-references (`$1`)
151
+ Style/PerlBackrefs:
152
+ Enabled: false
153
+
154
+ # Prefer `has_key?` and `has_value?` for hashes
155
+ Style/PreferredHashMethods:
156
+ EnforcedStyle: verbose
157
+
158
+ # Prefer `rescue` over `rescue StandardError`
159
+ Style/RescueStandardError:
160
+ EnforcedStyle: implicit
161
+
162
+ # Allow perl style global variables like `$?`
163
+ Style/SpecialGlobalVars:
164
+ Enabled: false
165
+
166
+ # Prefer multiline arrays to end with a comma for easy alteration
167
+ Style/TrailingCommaInArrayLiteral:
168
+ EnforcedStyleForMultiline: comma
169
+
170
+ # Prefer multiline hashes to end with a comma for easy alteration
171
+ Style/TrailingCommaInHashLiteral:
172
+ EnforcedStyleForMultiline: comma
metadata ADDED
@@ -0,0 +1,51 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rentacop
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Danny Ben Shitrit
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2022-11-16 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Collection of more relaxed rubocop rules
14
+ email: db@dannyben.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - LICENSE
20
+ - README.md
21
+ - lib/rentacop/version.rb
22
+ - rentacop.yml
23
+ homepage: https://github.com/dannyben/rentacop
24
+ licenses:
25
+ - MIT
26
+ metadata:
27
+ bug_tracker_uri: https://github.com/DannyBen/rentacop/issues
28
+ changelog_uri: https://github.com/DannyBen/rentacop/blob/master/CHANGELOG.md
29
+ homepage_uri: https://github.com/dannyben/rentacop
30
+ source_code_uri: https://github.com/DannyBen/rentacop
31
+ rubygems_mfa_required: 'true'
32
+ post_install_message:
33
+ rdoc_options: []
34
+ require_paths:
35
+ - lib
36
+ required_ruby_version: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 2.6.0
41
+ required_rubygems_version: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ requirements: []
47
+ rubygems_version: 3.3.14
48
+ signing_key:
49
+ specification_version: 4
50
+ summary: Collection of more relaxed rubocop rules
51
+ test_files: []