forked from troessner/reek
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop.yml
137 lines (108 loc) · 3.13 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
126
127
128
129
130
131
132
133
134
135
136
137
inherit_from: .rubocop_todo.yml
require:
- rubocop-rspec
AllCops:
Exclude:
- 'samples/**/*'
- 'tmp/**/*'
- 'vendor/**/*'
TargetRubyVersion: 2.3
# Tables are nice
Layout/AlignHash:
EnforcedColonStyle: table
EnforcedHashRocketStyle: table
EnforcedLastArgumentHashStyle: ignore_implicit
# Place . on the previous line
Layout/DotPosition:
EnforcedStyle: trailing
# Require empty lines between defs, except for one-line defs
Layout/EmptyLineBetweenDefs:
AllowAdjacentOneLineDefs: true
# Use active_support's strip_heredoc to indent heredocs
Layout/IndentHeredoc:
EnforcedStyle: active_support
# Always put the closing brace on the last line
Layout/MultilineMethodCallBraceLayout:
EnforcedStyle: same_line
# Indent one level for follow-up lines
Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented
# Indent one level for follow-up lines
Layout/MultilineOperationIndentation:
EnforcedStyle: indented
# Assume the programmer knows how bracketed block syntax works
Lint/AmbiguousBlockAssociation:
Enabled: false
# Some of our source examples include interpolation explicitely.
Lint/InterpolationCheck:
Exclude:
- 'spec/**/*'
# We use :true and :false as AST node types.
Lint/BooleanSymbol:
Enabled: false
# Spec blocks can be any size
Metrics/BlockLength:
Exclude:
- 'spec/**/*'
# Be rather lenient with line length
Metrics/LineLength:
Max: 120
# Keyword arguments make long parameter lists readable
Metrics/ParameterLists:
CountKeywordArgs: false
# EOS is a fine name to use in our specs
Naming/HeredocDelimiterNaming:
Exclude:
- 'spec/**/*'
# These files do not test classes or modules
RSpec/DescribeClass:
Exclude:
- 'spec/quality/*_spec.rb'
- 'spec/performance/reek/smell_detectors/runtime_speed_spec.rb'
# Our examples are large because we have source literals in them
RSpec/ExampleLength:
Enabled: false
# rubocop-rspec expects a CodeClimate namespace to go with the code_climate directory.
RSpec/FilePath:
Exclude:
- 'spec/reek/report/code_climate/code_climate_configuration_spec.rb'
- 'spec/reek/report/code_climate/code_climate_fingerprint_spec.rb'
- 'spec/reek/report/code_climate/code_climate_formatter_spec.rb'
- 'spec/reek/report/code_climate/code_climate_report_spec.rb'
# Allow and/or for control flow only
Style/AndOr:
EnforcedStyle: conditionals
# Require comment for files in lib and bin
Style/FrozenStringLiteralComment:
Include:
- 'bin/*'
- 'lib/**/*'
EnforcedStyle: always
# Allow multiline block chains
Style/MultilineBlockChain:
Enabled: false
# There's nothing wrong with parallel assignment
Style/ParallelAssignment:
Enabled: false
Style/PercentLiteralDelimiters:
PreferredDelimiters:
default: ()
'%W': ()
'%I': ()
'%w': ()
'%i': ()
# Allow Perl-style references to regex matches
Style/PerlBackrefs:
Enabled: false
# Allow single-line method definitions
Style/SingleLineMethods:
Enabled: false
# Prefer symbols to look like symbols
Style/SymbolArray:
EnforcedStyle: brackets
# Allow small arrays of words with quotes
Style/WordArray:
MinSize: 4
Metrics/ClassLength:
Exclude:
- 'lib/reek/cli/options.rb'