This repository has been archived by the owner on Jan 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop.yml
121 lines (97 loc) · 2.35 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
AllCops:
Exclude:
- Guardfile
- 'vendor/**/*'
- 'test/**/*'
Rails:
Enabled: false
# NLP is hard
AbcSize:
Max: 22.5
AlignParameters:
Enabled: false
ClassAndModuleChildren:
Enabled: false
# NLP is hard
CyclomaticComplexity:
Max: 12
Encoding:
Enabled: false
HashSyntax:
Exclude:
- Rakefile
- 'spec/**/*'
- 'test/**/*'
LineLength:
Max: 200
# NLP is hard
MethodLength:
Max: 15
PerceivedComplexity:
Max: 12
# Don't fail on whitespace between method names and arguments
Style/SpaceBeforeFirstArg:
Enabled: false
Style/SymbolArray:
Enabled: false
# Indent private/protected/public as deep as method definitions
Style/AccessModifierIndentation:
EnforcedStyle: indent
SupportedStyles:
- outdent
- indent
Style/AlignHash:
# table - left alignment of keys, hash rockets, and values
EnforcedHashRocketStyle: table
# table - left alignment of keys and values
EnforcedColonStyle: key
EnforcedLastArgumentHashStyle: always_inspect
Style/AlignParameters:
EnforcedStyle: with_fixed_indentation
Style/AndOr:
# Whether `and` and `or` are banned only in conditionals (conditionals)
# or completely (always).
EnforcedStyle: always
# Checks if usage of %() or %Q() matches configuration.
Style/BarePercentLiterals:
EnforcedStyle: percent_q
Style/BracesAroundHashParameters:
EnforcedStyle: context_dependent
# Checks formatting of special comments
Style/CommentAnnotation:
Keywords:
- TODO
- FIXME
- OPTIMIZE
- HACK
- REVIEW
- PCI
- LEGAL
- NOTE
Style/IndentationWidth:
# Number of spaces for each indentation level.
Width: 2
Style/DotPosition:
EnforcedStyle: trailing
Style/EmptyLineBetweenDefs:
# If true, this parameter means that single line method definitions don't
# need an empty line between them.
AllowAdjacentOneLineDefs: false
Style/EmptyLinesAroundBlockBody:
EnforcedStyle: no_empty_lines
Style/EmptyLinesAroundClassBody:
EnforcedStyle: no_empty_lines
Style/EmptyLinesAroundModuleBody:
EnforcedStyle: no_empty_lines
# Checks whether the source file has a utf-8 encoding comment or not
Style/Encoding:
EnforcedStyle: when_needed
Style/HashSyntax:
EnforcedStyle: ruby19
Style/MethodName:
EnforcedStyle: snake_case
# Allow safe assignment in conditions.
Style/ParenthesesAroundCondition:
AllowSafeAssignment: true
Style/RaiseArgs:
EnforcedStyle: exploded