This repository was archived by the owner on Oct 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop.yml
112 lines (87 loc) · 2.55 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
AllCops:
NewCops: enable
Exclude:
- _notes/**/*
- test/dummy/db/schema.rb
Style/StringLiterals:
Enabled: true
EnforcedStyle: double_quotes
Style/StringLiteralsInInterpolation:
Enabled: true
EnforcedStyle: double_quotes
Metrics/BlockLength:
Exclude:
- test/**/*
Metrics/MethodLength:
Max: 15
Exclude:
- test/**/*
Metrics/AbcSize:
Exclude:
- test/**/*
Layout/LineLength:
Max: 120
Style/WordArray:
Enabled: false
Layout/EmptyLineBetweenDefs:
AllowAdjacentOneLineDefs: true
Layout/EmptyLineAfterMultilineCondition:
Enabled: true
# Checks for a line break before the first element in a multi-line array.
Layout/FirstArrayElementLineBreak:
Enabled: true
# Checks for a line break before the first element in a multi-line hash.
Layout/FirstHashElementLineBreak:
Enabled: true
# Checks that each item in a multi-line array literal starts on a separate line.
Layout/MultilineArrayLineBreaks:
Enabled: true
# Check for a newline after the assignment operator in multi-line assignments.
Layout/MultilineAssignmentLayout:
Enabled: true
# Checks that each item in a multi-line hash literal starts on a separate line.
Layout/MultilineHashKeyLineBreaks:
Enabled: true
# Checks that each argument in a multi-line method call starts on a separate line.
Layout/MultilineMethodArgumentLineBreaks:
Enabled: true
# Checks unsafe usage of number conversion methods.
Lint/NumberConversion:
Enabled: true
# Enforces using `def self.method_name` or `class << self` to define class methods.
Style/ClassMethodsDefinitions:
Enabled: true
EnforcedStyle: self_class
# TODO: enable when ready to document!
# Document classes and non-namespace modules.
Style/Documentation:
Enabled: true
Exclude:
- 'test/**/*'
- 'db/migrate/*'
# TODO: enable when ready to document!
# Checks for missing documentation comment for public methods.
Style/DocumentationMethod:
Enabled: true
RequireForNonPublicMethods: true
Exclude:
- 'test/**/*'
- 'db/migrate/*'
# Avoid multi-line method signatures.
Style/MultilineMethodSignature:
Enabled: true
# Don't use option hashes when you can use keyword arguments.
Style/OptionHash:
Enabled: true
# Use return instead of return nil.
Style/ReturnNil:
Enabled: true
# Prefer `Object#__send__` or `Object#public_send` to `send`, as `send` may overlap with existing methods.
Style/Send:
Enabled: true
# Prefer symbols instead of strings as hash keys.
Style/StringHashKeys:
Enabled: true
# Checks for useless trailing commas in block arguments.
Style/TrailingCommaInBlockArgs:
Enabled: true