This repository was archived by the owner on Dec 25, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop.yml
125 lines (106 loc) · 4.89 KB
/
.rubocop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# Ignore third party and temporary files
AllCops:
Exclude:
- bin/htmldiff
- bin/ldiff
- bin/rspec
- bin/rubocop
- bin/ruby-parse
- bin/ruby-rewrite
- bin/serverspec-init
- node_modules/**/*
- tmp/**/*
- vendor/**/*
# Don't require parameters to line up on same line
# DEV: Sometimes we are nested and don't want to hit line limit easily
# https://github.com/bbatsov/rubocop/blob/v0.36.0/lib/rubocop/cop/style/align_parameters.rb
Style/AlignParameters:
Enabled: false
# Allow redundant braces around hash parameter for clarity
# https://github.com/bbatsov/rubocop/blob/v0.36.0/lib/rubocop/cop/style/braces_around_hash_parameters.rb
Style/BracesAroundHashParameters:
Enabled: false
# Don't require documentation for every class/module
# https://github.com/bbatsov/rubocop/blob/v0.36.0/lib/rubocop/cop/style/documentation.rb
Style/Documentation:
Enabled: false
# Prefer imperative logic rather than 1 liner `return + if`
# Example: `if a; return 1; else; return 2; end`, not `return 1 if a; return 2`
# https://github.com/bbatsov/rubocop/blob/v0.36.0/lib/rubocop/cop/style/guard_clause.rb
# https://github.com/bbatsov/rubocop/blob/v0.36.0/config/enabled.yml#L306
Style/GuardClause:
Enabled: false
# Use hash rockets to prevent confusion when using symbols as values
# Example: `:action => :create`, not `action: :create`
# https://github.com/bbatsov/rubocop/blob/v0.36.0/lib/rubocop/cop/style/hash_syntax.rb
# https://github.com/bbatsov/rubocop/blob/v0.36.0/config/enabled.yml#L313
Style/HashSyntax:
EnforcedStyle: hash_rockets
# Prefer imperative logic rather than 1 liner `return + if`
# Example: `if a; return 1; end`, not `return 1 if a`
# https://github.com/bbatsov/rubocop/blob/v0.36.0/spec/rubocop/cop/style/if_unless_modifier_spec.rb
# https://github.com/bbatsov/rubocop/blob/v0.36.0/config/enabled.yml#L324
Style/IfUnlessModifier:
Enabled: false
# Allow sane indentation for hash
# Example: `env({\n :abc => :def\n})`
# https://github.com/bbatsov/rubocop/blob/v0.36.0/lib/rubocop/cop/style/indent_hash.rb
Style/IndentHash:
EnforcedStyle: consistent
# Prefer concatenation rather than trailing slash hacks
# DEV: Skipping concatenation is a micro-optimization. The compiler/interpreter will optimize it out if necessary
# https://github.com/bbatsov/rubocop/blob/v0.36.0/lib/rubocop/cop/style/line_end_concatenation.rb
Style/LineEndConcatenation:
Enabled: false
# Allow (and lean towards using) parenthenses
# Example: `package('bash').to(be_installed())`, not `to(be_installed)`
# https://github.com/bbatsov/rubocop/blob/v0.36.0/lib/rubocop/cop/style/method_call_parentheses.rb
# https://github.com/bbatsov/rubocop/blob/v0.36.0/config/enabled.yml#L392
Style/MethodCallParentheses:
Enabled: false
# Allow both `if` and `unless` for appropriate situation
# https://github.com/bbatsov/rubocop/blob/v0.36.0/lib/rubocop/cop/style/negated_if.rb
Style/NegatedIf:
Enabled: false
# Allow numeric literals to not use `_` as 3 digit delimiter
# Example: `12345`, not `12_345`
# https://github.com/bbatsov/rubocop/blob/v0.36.0/lib/rubocop/cop/style/numeric_literals.rb
Style/NumericLiterals:
Enabled: false
# Allow `self` to be used for clarity
# https://github.com/bbatsov/rubocop/blob/v0.36.0/lib/rubocop/cop/style/redundant_self.rb
Style/RedundantSelf:
Enabled: false
# Allow explicit returns
Style/RedundantReturn:
Enabled: false
# Require no whitespace for default values in parametes
# Example: `def hello(a=1)`, not `def hello(a = 1)`
# https://github.com/bbatsov/rubocop/blob/v0.36.0/lib/rubocop/cop/style/space_around_equals_in_parameter_default.rb
Style/SpaceAroundEqualsInParameterDefault:
EnforcedStyle: no_space
# Require double quotes to always be used for consistency
# Example: "hello", not 'hello'
# DEV: There is no performance loss as the compiler/interpreter will optimize hot code
# https://viget.com/extend/just-use-double-quoted-ruby-strings
# https://github.com/bbatsov/rubocop/blob/v0.36.0/lib/rubocop/cop/style/string_literals.rb
# https://github.com/bbatsov/rubocop/blob/v0.36.0/config/enabled.yml#L758
Style/StringLiterals:
EnforcedStyle: double_quotes
# Perform similar enhancement for interpolated quotes
# https://github.com/bbatsov/rubocop/blob/v0.36.0/lib/rubocop/cop/style/string_literals_in_interpolation.rb
Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes
# Allow (and lean towards using) trailing commas in literals
# Example: `[1,\n2,\n3,\n]`, not `[1,\n2,\n3\n]`
# https://github.com/bbatsov/rubocop/blob/v0.36.0/lib/rubocop/cop/style/trailing_comma_in_literal.rb
# https://github.com/bbatsov/rubocop/blob/v0.36.0/config/enabled.yml#L797
Style/TrailingCommaInLiteral:
Enabled: false
# Require using brackets instead of `%w`/`%W` for arrays of words
# Example: `["foo","bar"]`, not `%w(foo bar)`
# https://github.com/bbatsov/rubocop/blob/v0.36.0/lib/rubocop/cop/style/word_array.rb#L16-L32
Style/WordArray:
EnforcedStyle: brackets
Metrics/LineLength:
Max: 120