mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-04 00:00:37 -04:00
The previous implementation of the webmock plugin bypassed the connection layer, which made it ignore key plugins like the retries plugin. The whole plugin was redone so that it'd hook at the connection level when piping requests. A small difficulty was on how to handle the connection initialization state when needing to unmock, as name resolving triggers before requests are piped. A hack with a #once callback was implemented. Fixes #170
165 lines
3.0 KiB
YAML
165 lines
3.0 KiB
YAML
inherit_from: .rubocop_todo.yml
|
|
|
|
require: rubocop-performance
|
|
|
|
AllCops:
|
|
NewCops: enable
|
|
TargetRubyVersion: 2.7
|
|
DisplayCopNames: true
|
|
Include:
|
|
- lib/**/*.rb
|
|
- test/**/*.rb
|
|
- regression_tests/**/*.rb
|
|
- integrations/**/*.rb
|
|
- Rakefile
|
|
- httpx.gemspec
|
|
- profiler/**/*
|
|
Exclude:
|
|
- '*.rb'
|
|
- 'bugreports/*'
|
|
- 'examples/**/*'
|
|
- '.bundle/**/*'
|
|
- 'vendor/**/*'
|
|
- 'www/**/*'
|
|
- 'lib/httpx/extensions.rb'
|
|
- 'lib/httpx/punycode.rb'
|
|
# Do not lint ffi block, for openssl parity
|
|
- 'lib/httpx/io/tls/*.rb'
|
|
- 'test/extensions/response_pattern_match.rb'
|
|
|
|
Metrics/ClassLength:
|
|
Max: 400
|
|
|
|
Metrics/MethodLength:
|
|
Max: 200
|
|
|
|
Metrics/ParameterLists:
|
|
Max: 6
|
|
CountKeywordArgs: false
|
|
|
|
Naming/FileName:
|
|
Exclude:
|
|
- Gemfile
|
|
- Rakefile
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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/digest_authentication.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' |