-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop.yml
142 lines (113 loc) · 3.32 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
138
139
140
141
142
require: rubocop-rspec
Metrics/LineLength:
Max: 100
Style/MultilineBlockChain:
Enabled: false
Metrics/AbcSize:
Max: 20
Metrics/MethodLength:
Enabled: false
Metrics/BlockLength:
Enabled: true
Exclude:
- spec/**/*
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: consistent_comma
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: consistent_comma
Style/GuardClause:
Enabled: false
Style/AsciiComments:
# ¯\_(ツ)_/¯
Enabled: false
Layout/EmptyLinesAroundArguments:
Enabled: false
RSpec/NestedGroups:
Max: 5
RSpec/ExampleLength:
Max: 8
RSpec/FilePath:
Enabled: false
# The following cops are added between 0.52.1 and 0.58.0.
# The configurations are default.
# If you want to use a cop by default, remove a configuration for the cop from here.
# If you want to disable a cop, change `Enabled` to false.
# Supports --auto-correct
Layout/EmptyComment:
Description: Checks empty comment.
Enabled: true
AllowBorderComment: true
AllowMarginComment: true
# Supports --auto-correct
Lint/BigDecimalNew:
Description: "`BigDecimal.new()` is deprecated. Use `BigDecimal()` instead."
Enabled: true
Lint/NumberConversion:
Description: Checks unsafe usage of number conversion methods.
Enabled: false
# Supports --auto-correct
Lint/OrderedMagicComments:
Description: Checks the proper ordering of magic comments and whether a magic comment
is not placed before a shebang.
Enabled: true
# Supports --auto-correct
Lint/UnneededCopEnableDirective:
Description: Checks for rubocop:enable comments that can be removed.
Enabled: true
# Enabled by default
Naming/MemoizedInstanceVariableName:
Description: Memoized method name should match memo instance variable name.
Enabled: false
EnforcedStyleForLeadingUnderscores: disallowed
SupportedStylesForLeadingUnderscores:
- disallowed
- required
- optional
Naming/UncommunicativeBlockParamName:
Description: Checks for block parameter names that contain capital letters, end in
numbers, or do not meet a minimal length.
Enabled: true
MinNameLength: 1
AllowNamesEndingInNumbers: true
AllowedNames: []
ForbiddenNames: []
Naming/UncommunicativeMethodParamName:
Description: Checks for method parameter names that contain capital letters, end in
numbers, or do not meet a minimal length.
Enabled: true
MinNameLength: 3
AllowNamesEndingInNumbers: true
AllowedNames:
- io
- id
- to
- by
- 'on'
- in
- at
ForbiddenNames: []
# Supports --auto-correct
Rails/ActiveRecordAliases:
Description: 'Avoid Active Record aliases: Use `update` instead of `update_attributes`.
Use `update!` instead of `update_attributes!`.'
Enabled: true
Security/Open:
Description: The use of Kernel#open represents a serious security risk.
Enabled: true
# Supports --auto-correct
Style/ExpandPathArguments:
Description: Use `expand_path(__dir__)` instead of `expand_path('..', __FILE__)`.
Enabled: true
# Supports --auto-correct
Style/TrailingBodyOnClass:
Description: Class body goes below class statement.
Enabled: true
# Supports --auto-correct
Style/TrailingBodyOnModule:
Description: Module body goes below module statement.
Enabled: true
# Supports --auto-correct
Style/UnpackFirst:
Description: Checks for accessing the first element of `String#unpack` instead of
using `unpack1`
Enabled: true