-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
109 lines (83 loc) · 2.57 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
inherit_mode:
merge:
- Exclude
require:
- rubocop-minitest
- rubocop-packaging
- rubocop-performance
AllCops:
NewCops: enable
TargetRubyVersion: 3.0
# Put development dependencies in the gemspec so rubygems.org knows about them
Gemspec/DevelopmentDependencies:
EnforcedStyle: gemspec
# Make BeginEndAlignment behavior match EndAlignment
Layout/BeginEndAlignment:
EnforcedStyleAlignWith: begin
# Be lenient with line length
Layout/LineLength:
Max: 92
# Don't force lonely closing parentheses
Layout/MultilineMethodCallBraceLayout:
EnforcedStyle: same_line
# Multi-line method calls should be simply indented. Aligning them makes it
# even harder to keep a sane line length.
Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented
# Multi-line assignment should be simply indented. Aligning them makes it even
# harder to keep a sane line length.
Layout/MultilineOperationIndentation:
EnforcedStyle: indented
# Force consistent spacing independent of block contents
Layout/SpaceBeforeBlockBraces:
EnforcedStyleForEmptyBraces: space
# Assume the programmer knows how bracketed block syntax works
Lint/AmbiguousBlockAssociation:
Enabled: false
# Allow if (foo = get_foo) style
Lint/AssignmentInCondition:
AllowSafeAssignment: true
Metrics/BlockLength:
Exclude:
- 'test/**/*' # Test describe blocks can be any size
Performance/StartWith:
AutoCorrect: true
# Allow and/or for control flow only
Style/AndOr:
EnforcedStyle: conditionals
# Require at least two dependent lines before suggesting a guard clause
Style/GuardClause:
MinBodyLength: 2
# Sometimes an if statement just looks better than next with a guard clause
Style/Next:
Enabled: false
# Allow both real comparison and predicate methods
Style/NumericPredicate:
Enabled: false
# Use older RuboCop default
Style/PercentLiteralDelimiters:
PreferredDelimiters:
'%W': ()
'%w': ()
# Allow explicit return with multiple return values
Style/RedundantReturn:
AllowMultipleReturnValues: true
# Do not commit to use of interpolation
Style/StringLiterals:
EnforcedStyle: double_quotes
# Prefer symbols to look like symbols
Style/SymbolArray:
EnforcedStyle: brackets
# Accessors are only trivial if they match the ivar name
Style/TrivialAccessors:
ExactNameMatch: true
# Project-specific configuration goes here.
# Some of Gst's functions have long parameter lists
Metrics/ParameterLists:
Max: 7
# GObject has a lot of accessor method starting with get_ or set_
Naming/AccessorMethodName:
Enabled: false
# GirFFI uses a gir_ffi-something naming scheme.
Naming/FileName:
Enabled: false