rubocop-config-coverhound 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +45 -0
- data/default.yml +143 -0
- metadata +87 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b9467ff1b330e138f85cdd60d52dd3e9f6272a7e
|
4
|
+
data.tar.gz: 7342010a84ab151a5f61c4e6ece1fa7452cb5b3c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c7b39889c460959d7f4a07b2edca32d83ee10d27650fe4d6f9a8fe88b3ac3fd3dddb9ac532c508c508f1f0c0886860050a7601eda70b356fd1bc8b0d17fc22ba
|
7
|
+
data.tar.gz: 5f222f1a1de4a559378dd1a97ec39a58b0740f10cf92e34b4ecf40d2204116ca681f3c02ceabccf75c82b756fa44d627bb57f9dc1590680a56a941b7c7991f71
|
data/README.md
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
# rubocop-config-coverhound
|
2
|
+
|
3
|
+
CoverHound style guides and shared style configs.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
group :test, :development do
|
11
|
+
gem "rubocop-config-coverhound"
|
12
|
+
end
|
13
|
+
```
|
14
|
+
Or, for a Ruby library, add this to your gemspec:
|
15
|
+
|
16
|
+
```rb
|
17
|
+
spec.add_development_dependency "rubocop-config-coverhound"
|
18
|
+
```
|
19
|
+
|
20
|
+
And then execute:
|
21
|
+
|
22
|
+
$ bundle install
|
23
|
+
|
24
|
+
Or install it yourself as:
|
25
|
+
|
26
|
+
$ gem install rubocop-config-coverhound
|
27
|
+
|
28
|
+
## Usage
|
29
|
+
|
30
|
+
Create a `.rubocop.yml` with the following directives:
|
31
|
+
|
32
|
+
```yaml
|
33
|
+
inherit_gem:
|
34
|
+
rubocop-config-coverhound: default.yml
|
35
|
+
```
|
36
|
+
|
37
|
+
Now, run:
|
38
|
+
|
39
|
+
```bash
|
40
|
+
$ bundle exec rubocop
|
41
|
+
```
|
42
|
+
|
43
|
+
You do not need to include `rubocop` directly in your application's dependences.
|
44
|
+
`rubocop-config-coverhound` will include a specific version of `rubocop` that is shared across
|
45
|
+
all projects.
|
data/default.yml
ADDED
@@ -0,0 +1,143 @@
|
|
1
|
+
AllCops:
|
2
|
+
TargetRubyVersion: 2.3
|
3
|
+
DisplayCopNames: true
|
4
|
+
Include:
|
5
|
+
- 'Rakefile'
|
6
|
+
- 'lib/**/*.rake'
|
7
|
+
- '**/Gemfile'
|
8
|
+
Exclude:
|
9
|
+
- 'db/schema.rb'
|
10
|
+
- 'vendor/**/*'
|
11
|
+
- '*.gemspec'
|
12
|
+
|
13
|
+
Rails:
|
14
|
+
Enabled: true
|
15
|
+
|
16
|
+
# ========================================
|
17
|
+
# LAYOUT
|
18
|
+
# ========================================
|
19
|
+
Layout/DotPosition:
|
20
|
+
EnforcedStyle: trailing
|
21
|
+
|
22
|
+
Layout/MultilineMethodCallIndentation:
|
23
|
+
EnforcedStyle: indented_relative_to_receiver
|
24
|
+
|
25
|
+
# We don't agree with this - it shouldn't ever be needed
|
26
|
+
#
|
27
|
+
# This would be corrected:
|
28
|
+
#
|
29
|
+
# foo :one,
|
30
|
+
# :two, :three
|
31
|
+
#
|
32
|
+
# To this:
|
33
|
+
#
|
34
|
+
# foo :one, :two,
|
35
|
+
# :three
|
36
|
+
#
|
37
|
+
# But we use:
|
38
|
+
#
|
39
|
+
# foo(
|
40
|
+
# :one,
|
41
|
+
# :two,
|
42
|
+
# :three
|
43
|
+
# )
|
44
|
+
Layout/AlignParameters:
|
45
|
+
Enabled: false
|
46
|
+
|
47
|
+
# This has been unreliable for us
|
48
|
+
Layout/MultilineOperationIndentation:
|
49
|
+
Enabled: false
|
50
|
+
|
51
|
+
# ========================================
|
52
|
+
# LINT
|
53
|
+
# ========================================
|
54
|
+
Lint/AmbiguousRegexpLiteral:
|
55
|
+
Enabled: false
|
56
|
+
|
57
|
+
# This is specifically for our use of delegate:
|
58
|
+
#
|
59
|
+
# private *delegate(
|
60
|
+
# ...
|
61
|
+
# )
|
62
|
+
Lint/AmbiguousOperator:
|
63
|
+
Enabled: false
|
64
|
+
|
65
|
+
# This is specifically for our use of delegate:
|
66
|
+
#
|
67
|
+
# private *delegate(
|
68
|
+
# ...
|
69
|
+
# )
|
70
|
+
Lint/UnneededSplatExpansion:
|
71
|
+
Enabled: false
|
72
|
+
|
73
|
+
Lint/Void:
|
74
|
+
Enabled: false
|
75
|
+
|
76
|
+
# ========================================
|
77
|
+
# METRICS
|
78
|
+
# ========================================
|
79
|
+
Metrics/BlockLength:
|
80
|
+
Exclude:
|
81
|
+
- 'test/**/*'
|
82
|
+
|
83
|
+
# Some of our classes are adapters or XML builders.
|
84
|
+
Metrics/ClassLength:
|
85
|
+
Enabled: false
|
86
|
+
|
87
|
+
Metrics/LineLength:
|
88
|
+
Max: 120
|
89
|
+
|
90
|
+
Metrics/MethodLength:
|
91
|
+
Max: 20
|
92
|
+
|
93
|
+
# ========================================
|
94
|
+
# NAMING
|
95
|
+
# ========================================
|
96
|
+
Naming/VariableNumber:
|
97
|
+
Enabled: false
|
98
|
+
|
99
|
+
# ========================================
|
100
|
+
# STYLE
|
101
|
+
# ========================================
|
102
|
+
Style/Alias:
|
103
|
+
EnforcedStyle: prefer_alias_method
|
104
|
+
|
105
|
+
Style/AndOr:
|
106
|
+
EnforcedStyle: conditionals
|
107
|
+
|
108
|
+
# This goes against the Rails style and can cause load order issues
|
109
|
+
Style/ClassAndModuleChildren:
|
110
|
+
Enabled: false
|
111
|
+
|
112
|
+
# We reserve code comments for crazy code. As we don't write libraries,
|
113
|
+
# our code does not have documentation
|
114
|
+
Style/Documentation:
|
115
|
+
Enabled: false
|
116
|
+
|
117
|
+
# We're ok with using double negation
|
118
|
+
Style/DoubleNegation:
|
119
|
+
Enabled: false
|
120
|
+
|
121
|
+
# Ruby's new version will make this unnecessary
|
122
|
+
Style/FrozenStringLiteralComment:
|
123
|
+
Enabled: false
|
124
|
+
|
125
|
+
# We feel this rule is too strict
|
126
|
+
Style/PercentLiteralDelimiters:
|
127
|
+
Enabled: false
|
128
|
+
|
129
|
+
Style/SignalException:
|
130
|
+
Enabled: false
|
131
|
+
|
132
|
+
Style/StringLiterals:
|
133
|
+
Enabled: false
|
134
|
+
|
135
|
+
Style/TrailingCommaInArguments:
|
136
|
+
Enabled: false
|
137
|
+
|
138
|
+
Style/TrailingCommaInLiteral:
|
139
|
+
Enabled: false
|
140
|
+
|
141
|
+
# This can be worse for diffs if we know it's variable
|
142
|
+
Style/WordArray:
|
143
|
+
Enabled: false
|
metadata
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rubocop-config-coverhound
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Bernardo Farah
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-08-10 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.49'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.49'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.15'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.15'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
description:
|
56
|
+
email:
|
57
|
+
- ber@bernardo.me
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- README.md
|
63
|
+
- default.yml
|
64
|
+
homepage: https://github.com/coverhound/coverhound-style
|
65
|
+
licenses: []
|
66
|
+
metadata: {}
|
67
|
+
post_install_message:
|
68
|
+
rdoc_options: []
|
69
|
+
require_paths:
|
70
|
+
- lib
|
71
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '0'
|
81
|
+
requirements: []
|
82
|
+
rubyforge_project:
|
83
|
+
rubygems_version: 2.6.12
|
84
|
+
signing_key:
|
85
|
+
specification_version: 4
|
86
|
+
summary: CoverHound style guides and shared style configs.
|
87
|
+
test_files: []
|