rubocop-pragmatic 0.1.0

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: 6bbec56c309181b334d189a7d5fc2a61c4ff8a167cab2747cb57593136043f1c
4
+ data.tar.gz: de407bdd2ca000d06d332433067619f2d63cb21986a340521aafcf8aee216e76
5
+ SHA512:
6
+ metadata.gz: 6cf77fdfc1733b5fea10741ea2267f7b4ee3424c6fe9700e6c291dd44d451c1430106d57d1a721e78f57097879d5ed379b38558f8c4657b69fb83a933ff0b772
7
+ data.tar.gz: 8827f6d09a5edcadca169b7c56aad71731fd4fca357c72f195e76f9adbd7ff85ee8a6216c56fdf6b6ef20e334eecb91cd5cb5e56f3c5e6d85dc8d4cb009d98ff
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 Ryan McGeary
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,49 @@
1
+ # Pragmatic Ruby Styling for Projects
2
+
3
+ ## Installation
4
+
5
+ ```ruby
6
+ gem "rubocop-pragmatic", require: false, group: [:development]
7
+ ```
8
+
9
+ Run `bundle`, then `bundle binstubs rubocop`.
10
+
11
+ Add a default `.rubocop.yml` file in the root of your Rails application with:
12
+
13
+ ```yml
14
+ inherit_gem:
15
+ rubocop-pragmatic: rails.yml
16
+
17
+ # Your own specialized rules go here
18
+ ```
19
+
20
+ For a ruby gem or project (not using Rails):
21
+
22
+ ```yml
23
+ inherit_gem:
24
+ rubocop-pragmatic: ruby.yml
25
+
26
+ # Your own specialized rules go here
27
+ ```
28
+
29
+ Or to customize your own combination:
30
+
31
+ ```yml
32
+ inherit_gem:
33
+ rubocop-pragmatic:
34
+ - rubocop.yml
35
+ - rubocop-factory_bot.yml
36
+ - rubocop-md.yml
37
+ - rubocop-minitest.yml
38
+ - rubocop-performance.yml
39
+
40
+ inherit_mode:
41
+ merge:
42
+ - Exclude
43
+
44
+ # Your own specialized rules go here
45
+ ```
46
+
47
+ ## License
48
+
49
+ [MIT License](https://rmm5t.mit-license.org/)
@@ -0,0 +1,5 @@
1
+ module Rubocop
2
+ module Pragmatic
3
+ VERSION = "0.1.0".freeze
4
+ end
5
+ end
@@ -0,0 +1,6 @@
1
+ require "rubocop/pragmatic/version"
2
+
3
+ module Rubocop
4
+ module Pragmatic
5
+ end
6
+ end
data/rails.yml ADDED
@@ -0,0 +1,18 @@
1
+ inherit_from:
2
+ - ruby.yml
3
+ - rubocop-capybara.yml
4
+ - rubocop-factory_bot.yml
5
+ - rubocop-rails.yml
6
+
7
+ inherit_mode:
8
+ merge:
9
+ - Exclude
10
+
11
+ AllCops:
12
+ NewCops: enable
13
+ Exclude:
14
+ - "config/environments/*"
15
+ - "config/puma.rb"
16
+ - "db/schema.rb"
17
+ - "engines/**/*"
18
+ - "gems/**/*"
@@ -0,0 +1,10 @@
1
+ plugins:
2
+ - rubocop-capybara
3
+
4
+ # ----------------------------------------
5
+
6
+ Capybara:
7
+ Severity: convention
8
+
9
+ Capybara/NegationMatcherAfterVisit:
10
+ Enabled: false # silly, and results in false-positives
@@ -0,0 +1,10 @@
1
+ plugins:
2
+ - rubocop-factory_bot
3
+
4
+ # ----------------------------------------
5
+
6
+ FactoryBot:
7
+ Severity: convention
8
+
9
+ FactoryBot/CreateList: # silly correction recommendations as of rubocop-factory_bot v2.23.1
10
+ Enabled: false
data/rubocop-faker.yml ADDED
@@ -0,0 +1,7 @@
1
+ plugins:
2
+ - rubocop-faker
3
+
4
+ # ----------------------------------------
5
+
6
+ Faker:
7
+ Severity: convention
data/rubocop-md.yml ADDED
@@ -0,0 +1,7 @@
1
+ plugins:
2
+ - rubocop-md
3
+
4
+ # ----------------------------------------
5
+
6
+ Markdown:
7
+ Severity: convention
@@ -0,0 +1,16 @@
1
+ plugins:
2
+ - rubocop-minitest
3
+
4
+ # ----------------------------------------
5
+
6
+ Minitest:
7
+ Severity: convention
8
+
9
+ Minitest/EmptyLineBeforeAssertionMethods:
10
+ Enabled: false
11
+
12
+ Minitest/TestMethodName:
13
+ Enabled: false
14
+
15
+ Minitest/MultipleAssertions:
16
+ Enabled: false
@@ -0,0 +1,7 @@
1
+ plugins:
2
+ - rubocop-packaging
3
+
4
+ # ----------------------------------------
5
+
6
+ Packaging:
7
+ Severity: convention
@@ -0,0 +1,10 @@
1
+ plugins:
2
+ - rubocop-performance
3
+
4
+ # ----------------------------------------
5
+
6
+ Performance:
7
+ Severity: refactor
8
+
9
+ Performance/BigDecimalWithNumericArgument:
10
+ Enabled: false
data/rubocop-rails.yml ADDED
@@ -0,0 +1,33 @@
1
+ plugins:
2
+ - rubocop-rails
3
+
4
+ # ----------------------------------------
5
+
6
+ Rails:
7
+ Severity: convention
8
+
9
+ Rails/BulkChangeTable:
10
+ Database: postgresql
11
+
12
+ Rails/I18nLocaleTexts:
13
+ Enabled: false
14
+
15
+ Rails/LexicallyScopedActionFilter:
16
+ Enabled: false
17
+
18
+ Rails/PluckInWhere:
19
+ Enabled: false
20
+
21
+ Rails/RefuteMethods:
22
+ Enabled: false
23
+
24
+ # Note: We're somewhat also using this as a "Rails/SkipsModelCallbacks" cop to
25
+ # ensure we don't skip Active Record callbacks
26
+ Rails/SkipsModelValidations:
27
+ AllowedMethods: ["touch", "toggle", "toggle!", "update_attribute"]
28
+ Exclude:
29
+ - "*/db/**/*.rb"
30
+ - "**/{spec,test}/**/*.rb"
31
+
32
+ Rails/ThreeStateBooleanColumn:
33
+ Enabled: false
data/rubocop-rake.yml ADDED
@@ -0,0 +1,7 @@
1
+ plugins:
2
+ - rubocop-rake
3
+
4
+ # ----------------------------------------
5
+
6
+ Rake:
7
+ Severity: convention
data/rubocop.yml ADDED
@@ -0,0 +1,159 @@
1
+ # ----------------------------------------
2
+
3
+ Bundler:
4
+ Severity: convention
5
+
6
+ # ----------------------------------------
7
+
8
+ Layout:
9
+ Severity: convention
10
+
11
+ # Allows either `key` OR `table` alignment for hashes
12
+ Layout/HashAlignment:
13
+ EnforcedColonStyle:
14
+ - key
15
+ - table
16
+ EnforcedHashRocketStyle:
17
+ - key
18
+ - table
19
+
20
+ Layout/EmptyLineAfterGuardClause:
21
+ Enabled: false
22
+
23
+ Layout/EmptyLinesAroundAttributeAccessor:
24
+ Enabled: false
25
+
26
+ Layout/LineLength:
27
+ Max: 150
28
+
29
+ Layout/MultilineMethodCallIndentation:
30
+ Enabled: false
31
+
32
+ # ----------------------------------------
33
+
34
+ Lint:
35
+ Severity: convention
36
+
37
+ # Unnecessarily noisy cop for constants that happen to be near their use in
38
+ # private methods.
39
+ Lint/UselessConstantScoping:
40
+ Enabled: false
41
+
42
+ Lint/UnusedMethodArgument:
43
+ AllowUnusedKeywordArguments: true
44
+
45
+ # ----------------------------------------
46
+
47
+ Metrics:
48
+ Severity: refactor
49
+
50
+ Metrics/AbcSize:
51
+ Max: 35
52
+
53
+ Metrics/BlockLength:
54
+ Max: 50
55
+ Exclude:
56
+ - "**/*.gemspec"
57
+ - "**/config/routes.rb"
58
+ - "**/config/routes/*"
59
+ - "**/config/initializers/**/*"
60
+ - "**/lib/tasks/**/*.rake"
61
+ - "**/{spec,test}/**/*.rb"
62
+
63
+ Metrics/ClassLength:
64
+ Max: 400
65
+ Exclude:
66
+ - "**/{spec,test}/**/*.rb"
67
+
68
+ Metrics/CyclomaticComplexity:
69
+ Max: 12
70
+
71
+ Metrics/MethodLength:
72
+ Max: 20
73
+ Exclude:
74
+ - "**/db/migrate/*"
75
+ - "**/{spec,test}/**/*.rb"
76
+
77
+ Metrics/ModuleLength:
78
+ Max: 400
79
+ Exclude:
80
+ - "**/{spec,test}/**/*.rb"
81
+
82
+ Metrics/ParameterLists:
83
+ CountKeywordArgs: false
84
+
85
+ Metrics/PerceivedComplexity:
86
+ Max: 12
87
+
88
+ # ----------------------------------------
89
+
90
+ Naming:
91
+ Severity: convention
92
+
93
+ Naming/VariableNumber:
94
+ Enabled: false
95
+
96
+ Naming/InclusiveLanguage:
97
+ Enabled: false
98
+
99
+ Naming/MethodParameterName:
100
+ AllowedNames: [as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to, x, y]
101
+
102
+ # ----------------------------------------
103
+
104
+ Style:
105
+ Severity: convention
106
+
107
+ Style/AccessorGrouping:
108
+ Enabled: false
109
+
110
+ Style/ClassAndModuleChildren:
111
+ Enabled: false
112
+
113
+ Style/Documentation:
114
+ Enabled: false
115
+
116
+ Style/DoubleNegation:
117
+ Enabled: false
118
+
119
+ Style/EmptyMethod:
120
+ Enabled: false
121
+
122
+ Style/Encoding:
123
+ Enabled: false
124
+
125
+ Style/FetchEnvVar:
126
+ Enabled: false
127
+
128
+ Style/FrozenStringLiteralComment:
129
+ Enabled: false
130
+
131
+ Style/MultilineBlockChain:
132
+ Enabled: false
133
+
134
+ Style/PercentLiteralDelimiters:
135
+ Enabled: false
136
+
137
+ Style/QuotedSymbols:
138
+ Enabled: false
139
+
140
+ Style/RescueModifier:
141
+ Enabled: false
142
+
143
+ Style/StringLiterals:
144
+ EnforcedStyle: double_quotes
145
+
146
+ Style/SymbolArray:
147
+ Enabled: false
148
+
149
+ Style/TernaryParentheses:
150
+ Enabled: false
151
+
152
+ Style/TrailingCommaInArguments:
153
+ EnforcedStyleForMultiline: consistent_comma
154
+
155
+ Style/TrailingCommaInArrayLiteral:
156
+ EnforcedStyleForMultiline: consistent_comma
157
+
158
+ Style/TrailingCommaInHashLiteral:
159
+ EnforcedStyleForMultiline: consistent_comma
data/ruby.yml ADDED
@@ -0,0 +1,23 @@
1
+ inherit_from:
2
+ - rubocop.yml
3
+ - rubocop-faker.yml
4
+ - rubocop-md.yml
5
+ - rubocop-minitest.yml
6
+ - rubocop-packaging.yml
7
+ - rubocop-performance.yml
8
+ - rubocop-rake.yml
9
+
10
+ inherit_mode:
11
+ merge:
12
+ - Exclude
13
+
14
+ AllCops:
15
+ NewCops: enable
16
+ Exclude:
17
+ - "bin/*"
18
+ - "log/**/*"
19
+ - "node_modules/**/*"
20
+ - "reports/**/*"
21
+ - "tmp/**/*"
22
+ - "vendor/**/*"
23
+ - ".vendor/**/*"
metadata ADDED
@@ -0,0 +1,204 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rubocop-pragmatic
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Ryan McGeary
8
+ - Beshad Talayeminaei
9
+ - Dylan Poole
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 1980-01-02 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rubocop
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '1.81'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '1.81'
28
+ - !ruby/object:Gem::Dependency
29
+ name: rubocop-faker
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: '1.3'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '1.3'
42
+ - !ruby/object:Gem::Dependency
43
+ name: rubocop-md
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '2.0'
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '2.0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: rubocop-minitest
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '0.38'
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '0.38'
70
+ - !ruby/object:Gem::Dependency
71
+ name: rubocop-packaging
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - "~>"
75
+ - !ruby/object:Gem::Version
76
+ version: '0.6'
77
+ type: :runtime
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: '0.6'
84
+ - !ruby/object:Gem::Dependency
85
+ name: rubocop-performance
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - "~>"
89
+ - !ruby/object:Gem::Version
90
+ version: '1.26'
91
+ type: :runtime
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: '1.26'
98
+ - !ruby/object:Gem::Dependency
99
+ name: rubocop-rake
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - "~>"
103
+ - !ruby/object:Gem::Version
104
+ version: '0.7'
105
+ type: :runtime
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - "~>"
110
+ - !ruby/object:Gem::Version
111
+ version: '0.7'
112
+ - !ruby/object:Gem::Dependency
113
+ name: rubocop-capybara
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - "~>"
117
+ - !ruby/object:Gem::Version
118
+ version: '2.22'
119
+ type: :runtime
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - "~>"
124
+ - !ruby/object:Gem::Version
125
+ version: '2.22'
126
+ - !ruby/object:Gem::Dependency
127
+ name: rubocop-factory_bot
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - "~>"
131
+ - !ruby/object:Gem::Version
132
+ version: '2.28'
133
+ type: :runtime
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - "~>"
138
+ - !ruby/object:Gem::Version
139
+ version: '2.28'
140
+ - !ruby/object:Gem::Dependency
141
+ name: rubocop-rails
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - "~>"
145
+ - !ruby/object:Gem::Version
146
+ version: '2.34'
147
+ type: :runtime
148
+ prerelease: false
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - "~>"
152
+ - !ruby/object:Gem::Version
153
+ version: '2.34'
154
+ email:
155
+ - ryan@mcgeary.org
156
+ - 'btalayeminaei@gmail.com '
157
+ - dylanb0708@gmail.com
158
+ executables: []
159
+ extensions: []
160
+ extra_rdoc_files: []
161
+ files:
162
+ - LICENSE.txt
163
+ - README.md
164
+ - lib/rubocop/pragmatic.rb
165
+ - lib/rubocop/pragmatic/version.rb
166
+ - rails.yml
167
+ - rubocop-capybara.yml
168
+ - rubocop-factory_bot.yml
169
+ - rubocop-faker.yml
170
+ - rubocop-md.yml
171
+ - rubocop-minitest.yml
172
+ - rubocop-packaging.yml
173
+ - rubocop-performance.yml
174
+ - rubocop-rails.yml
175
+ - rubocop-rake.yml
176
+ - rubocop.yml
177
+ - ruby.yml
178
+ homepage: https://github.com/rmm5t/rubocop-pragmatic
179
+ licenses:
180
+ - MIT
181
+ metadata:
182
+ homepage_uri: https://github.com/rmm5t/rubocop-pragmatic
183
+ bug_tracker_uri: https://github.com/rmm5t/rubocop-pragmatic/issues
184
+ changelog_uri: https://github.com/rmm5t/rubocop-pragmatic/blob/main/CHANGELOG.md
185
+ source_code_uri: https://github.com/rmm5t/rubocop-pragmatic
186
+ rubygems_mfa_required: 'true'
187
+ rdoc_options: []
188
+ require_paths:
189
+ - lib
190
+ required_ruby_version: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: 3.3.0
195
+ required_rubygems_version: !ruby/object:Gem::Requirement
196
+ requirements:
197
+ - - ">="
198
+ - !ruby/object:Gem::Version
199
+ version: '0'
200
+ requirements: []
201
+ rubygems_version: 3.7.2
202
+ specification_version: 4
203
+ summary: Pragmatic Ruby Styling for Projects.
204
+ test_files: []