forked from prometheus/client_ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.rubocop.yml
More file actions
137 lines (108 loc) · 3.03 KB
/
Copy path.rubocop.yml
File metadata and controls
137 lines (108 loc) · 3.03 KB
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
inherit_from: .rubocop_todo.yml
AllCops:
Exclude:
- ".git/**/*"
NewCops: disable
TargetRubyVersion: 3.2
#
# RuboCop built-in settings.
# For documentation on all settings see: https://docs.rubocop.org/en/stable
#
# Trailing periods.
Layout/DotPosition:
Description: Checks the position of the dot in multi-line method calls.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
Enabled: true
EnforcedStyle: leading
# Turn on auto-correction of equals alignment.
Layout/EndAlignment:
AutoCorrect: true
# Prevent accidental windows line endings
Layout/EndOfLine:
EnforcedStyle: lf
# Use a table layout for hashes
Layout/HashAlignment:
Description: Align the elements of a hash literal if they span more than one line.
Enabled: true
EnforcedHashRocketStyle: key
EnforcedColonStyle: key
EnforcedLastArgumentHashStyle: always_inspect
# Match existing layout
Layout/SpaceInsideHashLiteralBraces:
Description: Use spaces inside hash literal braces - or don't.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
Enabled: true
EnforcedStyle: space
EnforcedStyleForEmptyBraces: no_space
SupportedStyles:
- space
- no_space
# Support long block lengths for tests
Metrics/BlockLength:
Exclude:
- "spec/**/*"
# Soften limits
Metrics/ClassLength:
Max: 250
Exclude:
- "spec/**/*"
# Soften limits
Metrics/MethodLength:
Max: 50
# Soften limits
Metrics/ModuleLength:
Max: 250
Metrics/ParameterLists:
CountKeywordArgs: false
# Needed for testing DateTime
# Style/DateTime:
# Exclude: ["spec/**/*"]
Style/Documentation:
Enabled: true
# One line methods
Style/EmptyMethod:
EnforcedStyle: expanded
# Ruby 3 compatibility feature
Style/FrozenStringLiteralComment:
Enabled: false
Style/NumericPredicate:
AutoCorrect: true
Style/StringLiterals:
Enabled: true
EnforcedStyle: single_quotes
Style/HashSyntax:
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-literals
Enabled: true
EnforcedStyle: ruby19_no_mixed_keys
EnforcedShorthandSyntax: never
Style/Encoding:
Enabled: false
Style/PercentLiteralDelimiters:
Enabled: false
Style/ExpandPathArguments:
Enabled: false
Style/SymbolArray:
Description: Use %i or %I for arrays of symbols.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-i
Enabled: false
Metrics/CyclomaticComplexity:
Description: A complexity metric that is strongly correlated to the number of test cases needed to validate a method.
Enabled: false
Metrics/PerceivedComplexity:
Enabled: false
Metrics/AbcSize:
Enabled: false
Layout/LineLength:
Description: Limit lines to 180 characters.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#80-character-limits
Enabled: true
Max: 180
AllowURI: true
Exclude:
- 'spec/**/*'
Style/NumericLiterals:
Description: Add underscores to large numeric literals to improve their readability.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
Enabled: false
Naming/AccessorMethodName:
Enabled: false