mlh-rubocop-config 1.0.1

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: 64e67e65f6a944c6fb648802bea94dfa95c6eb1e45f5469cdc7bb7c2d13dbe82
4
+ data.tar.gz: 64712722fdc7a023c17eda70eb15252aff03b6c4ca543566234cee99e892c13e
5
+ SHA512:
6
+ metadata.gz: 84201318f8e19a0a1b2ad36463703c4f5b5ed6ea6492b60ad68aa6ff5769318ed5969f57f02d3e16ab47c7ad37ba34a6276bdab0f4aa1d79ccc143d16a725dd9
7
+ data.tar.gz: 0f4f816591ffc86167dd1af13aa6ec232e772a7bf4c03e5a3dba16e61aaf40717380e3e08349af8395895e5c705c7114b6bffc6777b14decc8e8db991049eb5e
data/.gitignore ADDED
@@ -0,0 +1,10 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+ *.gem
10
+ Gemfile.lock
data/.rubocop.yml ADDED
@@ -0,0 +1,144 @@
1
+ require:
2
+ - rubocop-rspec
3
+ - rubocop-rails
4
+ - rubocop-performance
5
+
6
+ Layout/FirstHashElementIndentation:
7
+ Description: Enforces consistent indentation for the first key in a hash literal
8
+ EnforcedStyle: consistent
9
+ Enabled: true
10
+
11
+ Layout/MultilineMethodCallIndentation:
12
+ Description: Indent on multiline method call
13
+ EnforcedStyle: indented_relative_to_receiver
14
+ Enabled: true
15
+
16
+ Lint/AmbiguousBlockAssociation:
17
+ Description: Allows change method as ambiguous block association
18
+ AllowedMethods: [change]
19
+ Enabled: true
20
+
21
+ Metrics/AbcSize:
22
+ Description: Setting Max AbcSize to 30, default of 17 is arbitrary and too low
23
+ Max: 30
24
+ Enabled: false
25
+
26
+ Metrics/BlockLength:
27
+ Description: Allow block to have any length
28
+ Enabled: false
29
+
30
+ Metrics/ClassLength:
31
+ Description: Allow classes of any length
32
+ Enabled: false
33
+
34
+ Metrics/CyclomaticComplexity:
35
+ Description: Disabaling the cop since it can be arbitrary
36
+ Enabled: false
37
+
38
+ Metrics/MethodLength:
39
+ Description: Allow method to have any length
40
+ Enabled: false
41
+
42
+ Naming/MemoizedInstanceVariableName:
43
+ Description: Allows instance variable name to be different than method name
44
+ Enabled: false
45
+
46
+ Naming/VariableNumber:
47
+ Description: Makes sure that all numbered variables use snake case for their numbering.
48
+ EnforcedStyle: snake_case
49
+ CheckSymbols: false
50
+ Enabled: true
51
+
52
+ # To do: Resolve the offense Style/Documentation
53
+ Style/Documentation:
54
+ Description: Disabaling documentation
55
+ Enabled: false
56
+
57
+ Style/HashSyntax:
58
+ Description: Force use of the 1.9 syntax for hash with no mixed keys
59
+ EnforcedStyle: ruby19_no_mixed_keys
60
+ Enabled: true
61
+
62
+ Style/RegexpLiteral:
63
+ Description: Allow forward slashes within regular expressions
64
+ AllowInnerSlashes: true
65
+ Enabled: true
66
+
67
+ Style/SymbolArray:
68
+ Description: Force arrays of symbols to use bracket notation
69
+ EnforcedStyle: brackets
70
+ Enabled: true
71
+
72
+ Style/TernaryParentheses:
73
+ Description: Require parentheses in ternary conditions when they are complex
74
+ EnforcedStyle: require_parentheses_when_complex
75
+ Enabled: true
76
+
77
+ Style/WordArray:
78
+ Description: Force arrays of words to use bracket notation instead of %w
79
+ EnforcedStyle: brackets
80
+ Enabled: true
81
+
82
+ Rails/Blank:
83
+ Description: Allows usage of nil, empty and present
84
+ NilOrEmpty: false
85
+ NotPresent: false
86
+ UnlessPresent: false
87
+ Enabled: true
88
+
89
+ Rails/FilePath:
90
+ Description: Enable argument type for file path joining
91
+ EnforcedStyle: arguments
92
+ Enabled: true
93
+
94
+ Rails/LexicallyScopedActionFilter:
95
+ Description: Disable the cop as it has conflict with Lint/UselessMethodDefinition
96
+ Enabled: false
97
+
98
+ Rails/NotNullColumn:
99
+ Description: Disable not null column to avoid error due to rubocop
100
+ Enabled: false
101
+
102
+ Rails/SkipsModelValidations:
103
+ Description: Allows update and update_columns for faster execution
104
+ AllowedMethods: ['update_all']
105
+ Enabled: true
106
+
107
+ RSpec/AnyInstance:
108
+ Description: Allow stubbing instance of a class
109
+ Enabled: false
110
+
111
+ RSpec/ContextWording:
112
+ Description: Does not restrict starting context wording using when, with or without
113
+ Enabled: false
114
+
115
+ RSpec/ExampleLength:
116
+ Description: Allow test example to have any length
117
+ Enabled: false
118
+
119
+ RSpec/MultipleExpectations:
120
+ Description: Allow tests to contain multiple expectations
121
+ Enabled: false
122
+
123
+ RSpec/MultipleMemoizedHelpers:
124
+ Description: Does not limit the number of let to an arbitrary number
125
+ Enabled: false
126
+
127
+ Style/ClassAndModuleChildren:
128
+ Description: Allow compact and nested style of children definitions at classes and modules
129
+ Enabled: false
130
+
131
+ Style/FormatStringToken:
132
+ Description: Enforces template style for formatting strings
133
+ EnforcedStyle: template
134
+ Enabled: true
135
+
136
+ Style/NumericPredicate:
137
+ Description: Allows the use of comparison operator
138
+ EnforcedStyle: comparison
139
+ Enabled: true
140
+
141
+ Style/SymbolProc:
142
+ Description: Allows block for method with arguments
143
+ AllowMethodsWithArguments: true
144
+ Enabled: true
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ # Specify your gem's dependencies in mlh_rubocop_config.gemspec
6
+ gemspec
7
+
8
+ gem 'rake', '~> 13.0'
9
+ gem 'rubocop'
10
+ gem 'rubocop-performance'
11
+ gem 'rubocop-rails'
12
+ gem 'rubocop-rspec'
data/Gemfile.lock ADDED
@@ -0,0 +1,76 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ mlh-rubocop-config (1.0.1)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ activesupport (7.0.6)
10
+ concurrent-ruby (~> 1.0, >= 1.0.2)
11
+ i18n (>= 1.6, < 2)
12
+ minitest (>= 5.1)
13
+ tzinfo (~> 2.0)
14
+ ast (2.4.2)
15
+ concurrent-ruby (1.2.2)
16
+ i18n (1.14.1)
17
+ concurrent-ruby (~> 1.0)
18
+ json (2.6.3)
19
+ language_server-protocol (3.17.0.3)
20
+ minitest (5.18.1)
21
+ parallel (1.23.0)
22
+ parser (3.2.2.3)
23
+ ast (~> 2.4.1)
24
+ racc
25
+ racc (1.7.1)
26
+ rack (3.0.8)
27
+ rainbow (3.1.1)
28
+ rake (13.0.6)
29
+ regexp_parser (2.8.1)
30
+ rexml (3.2.5)
31
+ rubocop (1.54.1)
32
+ json (~> 2.3)
33
+ language_server-protocol (>= 3.17.0)
34
+ parallel (~> 1.10)
35
+ parser (>= 3.2.2.3)
36
+ rainbow (>= 2.2.2, < 4.0)
37
+ regexp_parser (>= 1.8, < 3.0)
38
+ rexml (>= 3.2.5, < 4.0)
39
+ rubocop-ast (>= 1.28.0, < 2.0)
40
+ ruby-progressbar (~> 1.7)
41
+ unicode-display_width (>= 2.4.0, < 3.0)
42
+ rubocop-ast (1.29.0)
43
+ parser (>= 3.2.1.0)
44
+ rubocop-capybara (2.18.0)
45
+ rubocop (~> 1.41)
46
+ rubocop-factory_bot (2.23.1)
47
+ rubocop (~> 1.33)
48
+ rubocop-performance (1.18.0)
49
+ rubocop (>= 1.7.0, < 2.0)
50
+ rubocop-ast (>= 0.4.0)
51
+ rubocop-rails (2.20.2)
52
+ activesupport (>= 4.2.0)
53
+ rack (>= 1.1)
54
+ rubocop (>= 1.33.0, < 2.0)
55
+ rubocop-rspec (2.22.0)
56
+ rubocop (~> 1.33)
57
+ rubocop-capybara (~> 2.17)
58
+ rubocop-factory_bot (~> 2.22)
59
+ ruby-progressbar (1.13.0)
60
+ tzinfo (2.0.6)
61
+ concurrent-ruby (~> 1.0)
62
+ unicode-display_width (2.4.2)
63
+
64
+ PLATFORMS
65
+ arm64-darwin-21
66
+
67
+ DEPENDENCIES
68
+ mlh-rubocop-config!
69
+ rake (~> 13.0)
70
+ rubocop
71
+ rubocop-performance
72
+ rubocop-rails
73
+ rubocop-rspec
74
+
75
+ BUNDLED WITH
76
+ 2.2.33
data/README.md ADDED
@@ -0,0 +1,34 @@
1
+ # MLH Rubocop Configuration
2
+
3
+ The MLH Rubocop Configuration provides a set of rules and guidelines for Ruby code.
4
+
5
+ ## Usage
6
+
7
+ To use the MLH Rubocop Configuration in your Ruby project, follow these steps:
8
+
9
+ 1. Add the MLH Rubocop Configuration gem to your Gemfile:
10
+ ```ruby
11
+ gem "mlh-rubocop-config"
12
+ ```
13
+
14
+ 2. In your project's `.rubocop.yml` file, include the MLH Rubocop Configuration by using the inherit_gem directive:
15
+
16
+ ```
17
+ inherit_gem:
18
+ mlh-rubocop-config: .rubocop.yml
19
+ ```
20
+
21
+ ## Example
22
+
23
+ Here's an example of how your project's `.rubocop.yml` file might look like when using the MLH Rubocop Configuration:
24
+
25
+ ```
26
+ # Inherit rules from the MLH Rubocop Configuration
27
+ inherit_gem:
28
+ mlh-rubocop-config: .rubocop.yml
29
+
30
+ # Add project-specific rules or overrides
31
+ AllCops:
32
+ Exclude:
33
+ - spec/**/* # Exclude spec files from Rubocop analysis
34
+ ```
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MlhRubocopConfig
4
+ VERSION = '1.0.1'
5
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'lib/mlh-rubocop-config/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'mlh-rubocop-config'
7
+ spec.version = MlhRubocopConfig::VERSION
8
+ spec.authors = ['Major League Hacking (MLH)']
9
+ spec.email = ['hi@mlh.io']
10
+ spec.homepage = 'https://github.com/MLH/MLH-Rubocop-Config'
11
+ spec.summary = 'MLH Rubocop Configuration'
12
+ spec.description = 'MLH Rubocop Config is a customized set of rules and guidelines for Ruby code.'
13
+
14
+ spec.files = Dir['{**/}{.*,*}'].select { |path| File.file?(path) && path !~ /^(?:pkg|build)/ }
15
+ spec.require_paths = ['lib']
16
+
17
+ spec.required_ruby_version = '>= 2.6.0'
18
+
19
+ spec.add_dependency 'rubocop'
20
+ spec.add_dependency 'rubocop-performance'
21
+ spec.add_dependency 'rubocop-rails'
22
+ spec.add_dependency 'rubocop-rspec'
23
+ end
metadata ADDED
@@ -0,0 +1,106 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mlh-rubocop-config
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Major League Hacking (MLH)
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-07-07 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: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '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: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
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: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rubocop-rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description: MLH Rubocop Config is a customized set of rules and guidelines for Ruby
70
+ code.
71
+ email:
72
+ - hi@mlh.io
73
+ executables: []
74
+ extensions: []
75
+ extra_rdoc_files: []
76
+ files:
77
+ - ".gitignore"
78
+ - ".rubocop.yml"
79
+ - Gemfile
80
+ - Gemfile.lock
81
+ - README.md
82
+ - lib/mlh-rubocop-config/version.rb
83
+ - mlh-rubocop-config.gemspec
84
+ homepage: https://github.com/MLH/MLH-Rubocop-Config
85
+ licenses: []
86
+ metadata: {}
87
+ post_install_message:
88
+ rdoc_options: []
89
+ require_paths:
90
+ - lib
91
+ required_ruby_version: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: 2.6.0
96
+ required_rubygems_version: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ version: '0'
101
+ requirements: []
102
+ rubygems_version: 3.2.33
103
+ signing_key:
104
+ specification_version: 4
105
+ summary: MLH Rubocop Configuration
106
+ test_files: []