httpx/.rubocop.yml
HoneyryderChuck 817a10a537 scoping http auth schemes out of its plugins, made them usable in proxy
In order to expose other auth schemes in proxy, the basic, digest and
ntlm modules were extracted from the plugins, these being left with the
request management. So now, an extra parameter, `:scheme`, can be
passed (it'll be "basic" for http and "socks5" for socks5 by default,
can also be "digest" or "ntlm", haven't tested those yet).
2022-05-07 13:57:10 +01:00

173 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
- integration_tests/**/*.rb
- standalone_tests/**/*.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
- '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
- 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
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