sashite-rubocop 1.0.0.beta1

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 7f1d8dc75c4c174b851cd9816da468a7d763082b56174d32e5f49488831812f5
4
+ data.tar.gz: ad3e3c99cc46b819bba03d0d74c31fefe1e9bab03ed13d474deae40ad8344e2c
5
+ SHA512:
6
+ metadata.gz: 695cc834a33779a25f6a00a943527ed06cce9a9d022cbcdbe37497933e2e3cab6074a18d983954731ae42c56d36f1cde3ace6664890f8914be7db9482ef9f06f
7
+ data.tar.gz: 5f49e002bd223d934f15c45a25a422fb8ca8cab2160b6619ea77a6d6990d91908df248ce7ae9d15f6009805a39a6a1dd8a2804783f9304198da59cebd6e1f5e1
data/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ # The MIT License
2
+
3
+ Copyright (c) 2022 Sashité
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,91 @@
1
+ # Sashité RuboCop
2
+
3
+ [![Version](https://img.shields.io/github/v/tag/sashite/sashite-rubocop.rb?label=Version&logo=github)](https://github.com/sashite/sashite-rubocop.rb/tags)
4
+ [![Ruby documentation](https://img.shields.io/badge/Ruby-documentation-blue.svg?logo=github)](https://rubydoc.info/github/sashite/sashite-rubocop.rb/main)
5
+ [![Ruby](https://github.com/sashite/sashite-rubocop.rb/workflows/Ruby/badge.svg?branch=main)](https://github.com/sashite/sashite-rubocop.rb/actions?query=workflow%3Aruby+branch%3Amain)
6
+ [![RuboCop](https://github.com/sashite/sashite-rubocop.rb/workflows/RuboCop/badge.svg?branch=main)](https://github.com/sashite/sashite-rubocop.rb/actions?query=workflow%3Arubocop+branch%3Amain)
7
+ [![License](https://img.shields.io/github/license/sashite/sashite-rubocop.rb?label=License&logo=github)](https://github.com/sashite/sashite-rubocop.rb/raw/main/LICENSE.md)
8
+
9
+ > Shared RuboCop config used by Sashité's Ruby projects 👮🏾
10
+
11
+ ## About
12
+
13
+ At Sashité, many of our services are built on Ruby.
14
+
15
+ To keep the code base consistent across projects, we have collected here the common style rules we use to improve readability and maintainability.
16
+
17
+ ![A chessboard, with a cop, a pawn and some Ruby](https://github.com/sashite/sashite-rubocop/raw/main/img/a-chessboard-with-a-cop-a-pawn-and-some-ruby.svg)
18
+
19
+ ## Installation
20
+
21
+ Add this line to your application's Gemfile:
22
+
23
+ ```ruby
24
+ gem "sashite-rubocop", ">= 1.0.0.beta1"
25
+ ```
26
+
27
+ And then execute:
28
+
29
+ ```sh
30
+ bundle install
31
+ ```
32
+
33
+ Or install it yourself as:
34
+
35
+ ```sh
36
+ gem install sashite-rubocop --pre
37
+ ```
38
+
39
+ ## Usage
40
+
41
+ There are 2 ways we can add these configs to your project.
42
+
43
+ ### Inherit from Gem
44
+
45
+ ```yaml
46
+ # .rubocop.yml
47
+ inherit_gem:
48
+ sashite-rubocop:
49
+ - config/rubocop.yml
50
+ - config/rubocop/performance.yml
51
+ - config/rubocop/rails.yml
52
+ - config/rubocop/rake.yml
53
+ - config/rubocop/rspec.yml
54
+ - config/rubocop/sequel.yml
55
+ - config/rubocop/thread_safety.yml
56
+
57
+ # Some files define `Exclude` for same cops. To merge the `Exclude` rules, add:
58
+ inherit_mode:
59
+ merge:
60
+ - Exclude
61
+ ```
62
+
63
+ ### Inherit from Remote URL
64
+
65
+ The example below assumes you want to fetch from the latest config (i.e., from `main` branch).
66
+
67
+ This is recommended if you prefer not to install any gem. RuboCop will download and cache copies of these config files locally.
68
+
69
+ For more details, please see the RuboCop document: <https://rubocop.readthedocs.io/en/latest/configuration/#inheriting-configuration-from-a-remote-url>
70
+
71
+ Add these lines to your `.rubocop.yml`:
72
+
73
+ ```yaml
74
+ # .rubocop.yml
75
+ inherit_from:
76
+ - https://raw.githubusercontent.com/sashite/sashite-rubocop/main/config/rubocop.yml
77
+ - https://raw.githubusercontent.com/sashite/sashite-rubocop/main/config/rubocop/performance.yml
78
+ - https://raw.githubusercontent.com/sashite/sashite-rubocop/main/config/rubocop/rails.yml
79
+ - https://raw.githubusercontent.com/sashite/sashite-rubocop/main/config/rubocop/rake.yml
80
+ - https://raw.githubusercontent.com/sashite/sashite-rubocop/main/config/rubocop/rspec.yml
81
+ - https://raw.githubusercontent.com/sashite/sashite-rubocop/main/config/rubocop/sequel.yml
82
+ - https://raw.githubusercontent.com/sashite/sashite-rubocop/main/config/rubocop/thread_safety.yml
83
+ ```
84
+
85
+ ## Versioning
86
+
87
+ __Sashité RuboCop__ uses [Semantic Versioning 2.0.0](https://semver.org/)
88
+
89
+ ## License
90
+
91
+ The [gem](https://rubygems.org/gems/sashite-rubocop) is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1 @@
1
+ require: rubocop-performance
@@ -0,0 +1,4 @@
1
+ require: rubocop-rails
2
+
3
+ Rails/SkipsModelValidations:
4
+ Enabled: false
@@ -0,0 +1 @@
1
+ require: rubocop-rake
@@ -0,0 +1,13 @@
1
+ require: rubocop-rspec
2
+
3
+ RSpec/ExampleLength:
4
+ Enabled: false
5
+
6
+ RSpec/MultipleMemoizedHelpers:
7
+ Enabled: false
8
+
9
+ RSpec/NestedGroups:
10
+ Enabled: false
11
+
12
+ RSpec/NamedSubject:
13
+ Enabled: false
@@ -0,0 +1 @@
1
+ require: rubocop-sequel
@@ -0,0 +1 @@
1
+ require: rubocop-thread_safety
@@ -0,0 +1,25 @@
1
+ AllCops:
2
+ NewCops: enable
3
+
4
+ Layout/HashAlignment:
5
+ EnforcedHashRocketStyle: table
6
+ EnforcedColonStyle: table
7
+
8
+ Metrics/ClassLength:
9
+ Enabled: false
10
+
11
+ Naming/MemoizedInstanceVariableName:
12
+ EnforcedStyleForLeadingUnderscores: required
13
+
14
+ Style/ClassAndModuleChildren:
15
+ EnforcedStyle: nested
16
+
17
+ Style/EmptyMethod:
18
+ EnforcedStyle: expanded
19
+
20
+ # As long as we don't need to use a version lower or equal to 1.9, we can use the new syntax.
21
+ Style/SymbolArray:
22
+ Enabled: true
23
+
24
+ Style/StringLiterals:
25
+ EnforcedStyle: double_quotes
metadata ADDED
@@ -0,0 +1,251 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sashite-rubocop
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0.beta1
5
+ platform: ruby
6
+ authors:
7
+ - Cyril Kato
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2022-08-13 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rubocop
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 1.35.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 1.35.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: rubocop-performance
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.14'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.14'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rubocop-rails
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.15'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.15'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rubocop-rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.6'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0.6'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop-rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '2.12'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '2.12'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop-sequel
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '0.3'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '0.3'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rubocop-thread_safety
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '0.4'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '0.4'
111
+ - !ruby/object:Gem::Dependency
112
+ name: brutal
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: bundler
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rake
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: rubocop
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: rubocop-md
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: rubocop-rake
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
195
+ - !ruby/object:Gem::Dependency
196
+ name: yaml
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
209
+ description: "Shared RuboCop config used by Sashité's Ruby projects \U0001F46E\U0001F3FE"
210
+ email: contact@cyril.email
211
+ executables: []
212
+ extensions: []
213
+ extra_rdoc_files: []
214
+ files:
215
+ - LICENSE.md
216
+ - README.md
217
+ - config/rubocop.yml
218
+ - config/rubocop/performance.yml
219
+ - config/rubocop/rails.yml
220
+ - config/rubocop/rake.yml
221
+ - config/rubocop/rspec.yml
222
+ - config/rubocop/sequel.yml
223
+ - config/rubocop/thread_safety.yml
224
+ homepage: https://github.com/sashite/sashite-rubocop.rb
225
+ licenses:
226
+ - MIT
227
+ metadata:
228
+ bug_tracker_uri: https://github.com/sashite/sashite-rubocop.rb/issues
229
+ documentation_uri: https://rubydoc.info/gems/sashite-rubocop
230
+ source_code_uri: https://github.com/sashite/sashite-rubocop.rb
231
+ rubygems_mfa_required: 'true'
232
+ post_install_message:
233
+ rdoc_options: []
234
+ require_paths:
235
+ - lib
236
+ required_ruby_version: !ruby/object:Gem::Requirement
237
+ requirements:
238
+ - - ">="
239
+ - !ruby/object:Gem::Version
240
+ version: 2.7.0
241
+ required_rubygems_version: !ruby/object:Gem::Requirement
242
+ requirements:
243
+ - - ">"
244
+ - !ruby/object:Gem::Version
245
+ version: 1.3.1
246
+ requirements: []
247
+ rubygems_version: 3.1.6
248
+ signing_key:
249
+ specification_version: 4
250
+ summary: "Shared RuboCop config used by Sashité's Ruby projects \U0001F46E\U0001F3FE"
251
+ test_files: []