rubocop-athix 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c628faf28d1e28ac81f22394abb6033b4a9c4e2c59e44024d54fbf8a18d8547c
4
+ data.tar.gz: 6a5c87c969a037778098c9d0e7a671b8bb19054e26407c871b2437231de47e79
5
+ SHA512:
6
+ metadata.gz: 978e01d88b7d9ddf3034542782463b630c902328d0d5f2efb6e44b5785b3e94297d2053151aebbca904b6a76c22a166e69b9d37b6d03c54a628f6e31cb245121
7
+ data.tar.gz: 3a882212d40cf4dec3ae9102dd0878cc4e8e6b791ea79d9a27b0eb2fa7358c8ad8e2ff082e601c4f86c2fc94b1635e817c0c2bce1739535b7b00bddd78be3257
data/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Josh Buker
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 all
13
+ 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 THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,52 @@
1
+ # RuboCop Athix
2
+
3
+ Contains my commonly used styling overrides for Rubocop.
4
+
5
+ ## Usage
6
+
7
+ ### Rails Applications
8
+
9
+ **Gemfile**
10
+
11
+ ```ruby
12
+ gem 'rubocop-athix'
13
+ gem 'rubocop-rails'
14
+ gem 'rubocop-rspec'
15
+ ```
16
+
17
+ **.rubocop.yml**
18
+
19
+ ```yaml
20
+ inherit_gem:
21
+ rubocop-athix:
22
+ - config/rails.yml
23
+ ```
24
+
25
+ ### Ruby Gems
26
+
27
+ ```ruby
28
+ gem 'rubocop-athix'
29
+ gem 'rubocop-rspec'
30
+ ```
31
+
32
+ **.rubocop.yml**
33
+
34
+ ```yaml
35
+ inherit_gem:
36
+ rubocop-athix:
37
+ - config/gems.yml
38
+ ```
39
+
40
+ ### Other Ruby code
41
+
42
+ ```ruby
43
+ gem 'rubocop-athix'
44
+ ```
45
+
46
+ **.rubocop.yml**
47
+
48
+ ```yaml
49
+ inherit_gem:
50
+ rubocop-athix:
51
+ - config/default.yml
52
+ ```
@@ -0,0 +1,33 @@
1
+ ##
2
+ # 80 Characters allows codebases to be more easily read in split screen mode,
3
+ # as well as on other sources such as terminal and Github.
4
+ #
5
+ # That said, one-line expectations in RSpec commonly exceed this limit, and the
6
+ # readability is significantly hindered when attempting to break these into
7
+ # multiple lines.
8
+ #
9
+ Layout/LineLength:
10
+ IgnoredPatterns: ['it { should']
11
+ Max: 80
12
+
13
+ # Variable assignment can be indented weirdly, so align to the ending statement
14
+ # instead
15
+ Layout/CaseIndentation:
16
+ EnforcedStyle: end
17
+ # Lines can get stupidly long if we indent it to the other params/args
18
+ Layout/ParameterAlignment:
19
+ EnforcedStyle: with_fixed_indentation
20
+ Layout/ArgumentAlignment:
21
+ EnforcedStyle: with_fixed_indentation
22
+ # Force prettier hash alignment
23
+ Layout/HashAlignment:
24
+ EnforcedHashRocketStyle: table
25
+ EnforcedColonStyle: table
26
+ # It can be unclear if a line is truly ended unless the dot is on the method
27
+ # receiver
28
+ Layout/DotPosition:
29
+ EnforcedStyle: trailing
30
+ # Allow extra spaces when aligning to other operators...
31
+ # (doesn't seem to work all the time though)
32
+ Layout/SpaceAroundOperators:
33
+ AllowForAlignment: true
@@ -0,0 +1,3 @@
1
+ # TODO: Is there a good way to break up specs without it getting unwieldy?
2
+ Metrics/BlockLength:
3
+ IgnoredMethods: ['describe', 'context', 'configure']
data/config/_rspec.yml ADDED
@@ -0,0 +1,5 @@
1
+ ##
2
+ # `should` is shorter than `is_expected.to` and visually superior.
3
+ #
4
+ RSpec/ImplicitExpect:
5
+ EnforcedStyle: should
data/config/_style.yml ADDED
@@ -0,0 +1,21 @@
1
+ ##
2
+ # ¯\_(ツ)_/¯
3
+ #
4
+ Style/AsciiComments:
5
+ AllowedChars: ['ツ', '¯']
6
+
7
+ ##
8
+ # This cop suggests changes that are not functionally equivalent, and its value
9
+ # is currently debated within the ruby community.
10
+ #
11
+ # See: https://github.com/bbatsov/ruby-style-guide/issues/556
12
+ #
13
+ Style/ModuleFunction:
14
+ Enabled: false
15
+
16
+ ##
17
+ # The readability of `[:some, :various, :symbols]` is superior to
18
+ # `%i[some various symbols]`, in my opinion.
19
+ #
20
+ Style/SymbolArray:
21
+ EnforcedStyle: brackets
@@ -0,0 +1,13 @@
1
+ inherit_from:
2
+ - _layout.yml
3
+ - _metrics.yml
4
+ - _rspec.yml
5
+ - _style.yml
6
+
7
+ require:
8
+ - rubocop-performance
9
+
10
+ AllCops:
11
+ NewCops: enable
12
+ SuggestExtensions: false
13
+ TargetRubyVersion: 3.0.0
data/config/gems.yml ADDED
@@ -0,0 +1,4 @@
1
+ inherit_from: default.yml
2
+
3
+ require:
4
+ - rubocop-rspec
data/config/rails.yml ADDED
@@ -0,0 +1,17 @@
1
+ inherit_from: default.yml
2
+
3
+ require:
4
+ - rubocop-rails
5
+ - rubocop-rspec
6
+
7
+ AllCops:
8
+ Exclude:
9
+ - 'bin/**/*'
10
+ - 'config/**/*'
11
+ - 'coverage/**/*'
12
+ - 'db/**/*'
13
+ - 'lib/templates/**/*'
14
+ - 'log/**/*'
15
+ - 'tmp/**/*'
16
+ - 'vendor/**/*'
17
+ - 'Gemfile'
metadata ADDED
@@ -0,0 +1,110 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rubocop-athix
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Josh Buker
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-06-25 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.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.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.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '12.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '12.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: '2.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '2.0'
69
+ description: Provides a centralized location for Athix's commonly used RuboCop overrides.
70
+ email: crypto@joshbuker.com
71
+ executables: []
72
+ extensions: []
73
+ extra_rdoc_files: []
74
+ files:
75
+ - LICENSE.md
76
+ - README.md
77
+ - config/_layout.yml
78
+ - config/_metrics.yml
79
+ - config/_rspec.yml
80
+ - config/_style.yml
81
+ - config/default.yml
82
+ - config/gems.yml
83
+ - config/rails.yml
84
+ homepage: https://github.com/athix/rubocop-athix
85
+ licenses:
86
+ - MIT
87
+ metadata:
88
+ bug_tracker_uri: https://github.com/athix/rubocop-athix/issues
89
+ changelog_uri: https://github.com/athix/rubocop-athix/releases/tag/v0.0.1
90
+ source_code_uri: https://github.com/athix/rubocop-athix/tree/v0.0.1
91
+ post_install_message:
92
+ rdoc_options: []
93
+ require_paths:
94
+ - lib
95
+ required_ruby_version: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: 2.5.0
100
+ required_rubygems_version: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ requirements: []
106
+ rubygems_version: 3.2.3
107
+ signing_key:
108
+ specification_version: 4
109
+ summary: RuboCop preferences for Athix
110
+ test_files: []