-
Notifications
You must be signed in to change notification settings - Fork 10
/
.rubocop.yml
178 lines (132 loc) · 3.15 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
166
167
168
169
170
171
172
173
174
175
176
177
178
inherit_from: .rubocop_todo.yml
require:
- rubocop-performance
- rubocop-md
AllCops:
NewCops: enable
TargetRubyVersion: 2.7
DisplayCopNames: true
Include:
- lib/**/*.rb
- test/**/*.rb
- regression_tests/**/*.rb
- integration_tests/**/*.rb
- standalone_tests/**/*.rb
- Rakefile
- httpx.gemspec
- profiler/**/*
Exclude:
- '*.rb'
- 'bugreports/*'
- 'examples/**/*'
- '.bundle/**/*'
- 'vendor/**/*'
- 'www/**/*'
- 'lib/httpx/extensions.rb'
# Do not lint ffi block, for openssl parity
- 'test/extensions/response_pattern_match.rb'
# Old release notes
- !ruby/regexp /doc/release_notes/0_.*.md/
Metrics/ClassLength:
Enabled: false
Metrics/MethodLength:
Max: 200
Metrics/ParameterLists:
Max: 6
CountKeywordArgs: false
Naming/FileName:
Exclude:
- Gemfile
- Rakefile
- Steepfile
Layout/EndAlignment:
EnforcedStyleAlignWith: variable
Style/Alias:
EnforcedStyle: prefer_alias_method
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: comma
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: comma
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes
Style/SignalException:
Enabled: false
Style/ParallelAssignment:
Enabled: false
Style/ParenthesesAroundCondition:
Enabled: false
Style/IfInsideElse:
Enabled: false
Style/MultilineIfModifier:
Enabled: false
Style/TrailingCommaInArguments:
Enabled: false
Style/TrailingUnderscoreVariable:
Enabled: false
Style/AccessModifierDeclarations:
Enabled: false
Style/GlobalVars:
Exclude:
- lib/httpx/plugins/internal_telemetry.rb
Style/RedundantBegin:
Enabled: false
Style/HashConversion:
Enabled: false
Style/FetchEnvVar:
Enabled: False
Performance/TimesMap:
Enabled: false
Performance/RedundantBlockCall:
Enabled: false
Performance/CollectionLiteralInLoop:
Enabled: false # most useless perf cop ever...
Naming/ClassAndModuleCamelCase:
Exclude:
- regression_tests/**/*.rb
# TODO: remove this if min supported version of ruby is 2.3
Style/HashSyntax:
Enabled: false
Style/AndOr:
Enabled: False
Style/ArgumentsForwarding:
Enabled: False
Naming/MethodParameterName:
Enabled: false
Lint/SuppressedException:
Enabled: false
Layout/LineLength:
Exclude:
- 'test/resolver/native_test.rb'
Max: 140
Layout/RescueEnsureAlignment:
Enabled: false
Lint/RedundantSplatExpansion:
Enabled: false
Style/OptionalBooleanParameter:
Enabled: false
Gemspec/RequiredRubyVersion:
Enabled: false
Lint/MissingSuper:
Exclude:
- 'lib/httpx/io/unix.rb'
Lint/DuplicateBranch:
Enabled: false # this doesn't work correctly
Lint/EmptyBlock:
Enabled: false # and neither does this. I don't control 3rd party methods.
Style/HashTransformValues:
Exclude:
- 'lib/httpx/plugins/authentication/digest.rb'
Bundler/DuplicatedGem:
Enabled: false
Naming/VariableNumber:
Enabled: false
Style/SlicingWithRange:
Enabled: false
Performance/StringIdentifierArgument:
Exclude:
- 'test/support/websocket_test_plugin.rb'
- 'test/support/requests/plugins/upgrade.rb'
Style/Lambda:
Enabled: false