This repository has been archived by the owner on May 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.rubocop.yml
165 lines (134 loc) · 4.14 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
AllCops:
TargetRubyVersion: 2.5
# list = posts.map { |post| post.title.strip }.
# select ...
Layout/DotPosition:
EnforcedStyle: trailing
# var = if condition
# code # Layout/IndentationWidth
# else # Layout/ElseAlignment
# end # Layout/EndAlignment
Layout/ElseAlignment:
Enabled: no
Layout/EndAlignment:
Enabled: no
Layout/IndentationWidth:
Enabled: no
Layout/FirstParameterIndentation:
Enabled: no
Layout/AccessModifierIndentation:
Enabled: no
Layout/AlignArray:
Enabled: no
Layout/IndentArray:
Enabled: no
Layout/IndentHash:
Enabled: no
# Interfacer, Route, store = import('registry').
# grab(:Interfacer, :Route, :data_store)
Layout/MultilineMethodCallIndentation:
Enabled: no
# def initialize(id: nil, title:, body:)# , author:, tags: Array.new)
# def initialize(id: nil, title:, body:) # , author:, tags: Array.new)
Layout/SpaceBeforeComment:
Enabled: no
# {a: 1} vs. { a: 1 }
#
# Configuration parameters: EnforcedStyleForEmptyBraces.
# SupportedStyles: space, no_space, compact
# SupportedStylesForEmptyBraces: space, no_space
Layout/SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space
# SupportedStyles: require_no_space, require_space
# Do not change `-> (example) { ... }` to `->(example) {}`.
Layout/SpaceInLambdaLiteral:
EnforcedStyle: require_space
# Do not add an empty line around `private|protected`.
Layout/EmptyLinesAroundAccessModifier:
Enabled: no
# Enable `if id = params[:id]`.
Lint/AssignmentInCondition:
Enabled: no
# Disable renaming unused variables to their `_var` versions.
Lint/UnusedMethodArgument:
Enabled: no
Lint/UnusedBlockArgument:
Enabled: no
# Disable warning about long blocks (i. e. `Class.new { ... lines }`).
Metrics/BlockLength:
Enabled: no
# Disables the following warning:
# Do not place comments on the same line as the def keyword.
#
# def initialize(id: nil, title:, body:)#, author:, tags: Array.new)
Style/CommentedKeyword:
Enabled: no
# @prompt.data# .merge(total: total_data[:total])
Layout/LeadingCommentSpace:
Enabled: no
# Do not change Hash.new to {}. I happen to like it this way dammit!
Style/EmptyLiteral:
Enabled: no
# Disable warning about optional arguments in front.
# def render(status_code = 200, content)
Style/OptionalArguments:
Enabled: no
# Do not warn about `@a, @b = a, b`.
Style/ParallelAssignment:
Enabled: no
# Do not remove `self`, it is not redundant.
Style/RedundantSelf:
Enabled: no
# Do not warn about `require 'pg'; PG.connect(dbname: 'blog')`.
Style/Semicolon:
Enabled: no
# Do not change an empty method to a one-liner.
Style/EmptyMethod:
EnforcedStyle: expanded
# Prefer `[:a, :b, :c]` over `%i[a b c]`.
Style/SymbolArray:
EnforcedStyle: brackets
Style/WordArray:
Enabled: no
# Do not change `Proc.new` to `proc`.
Style/Proc:
Enabled: no
Style/TernaryParentheses:
Enabled: no
# Do not enforce one particular style of quotation.
Style/StringLiterals:
# EnforcedStyle: single_quotes | double_quotes
Enabled: no
# The standard is 80, but I can fit 90 x 90 into a split screen.
Metrics/LineLength:
Max: 90
Metrics/AbcSize:
Max: 43
# Configuration parameters: CountComments, ExcludedMethods.
Metrics/BlockLength:
Max: 210
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 116
Metrics/CyclomaticComplexity:
Max: 10
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 36
# Configuration parameters: CountComments.
Metrics/ModuleLength:
Max: 115
# Configuration parameters: CountKeywordArgs.
Metrics/ParameterLists:
Max: 11
# TODO: This converts `block.call` to `yield`, but it leaves the `&block`
# in the arguments. Does it really help like this? It feels inconsistent.
Performance/RedundantBlockCall:
Enabled: no
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods.
# SupportedStyles: line_count_based, semantic, braces_for_chaining
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
# FunctionalMethods: let, let!, subject, watch
# IgnoredMethods: lambda, proc, it
Style/BlockDelimiters:
EnforcedStyle: braces_for_chaining