Skip to content

Commit

Permalink
Fix rubocop on master (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
fwininger committed Apr 26, 2024
1 parent 204a6c8 commit 4c130c9
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
AllCops:
NewCops: enable

Metrics/BlockLength:
Enabled: false
inherit_from: .rubocop_todo.yml
46 changes: 38 additions & 8 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,35 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2023-05-28 18:46:24 UTC using RuboCop version 1.51.0.
# on 2024-04-26 14:37:29 UTC using RuboCop version 1.63.3.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: Severity, Include.
# Include: **/*.gemspec
Gemspec/DeprecatedAttributeAssignment:
Exclude:
- 'docker_registry2.gemspec'

# Offense count: 6
# Configuration parameters: EnforcedStyle, AllowedGems, Include.
# SupportedStyles: Gemfile, gems.rb, gemspec
# Include: **/*.gemspec, **/Gemfile, **/gems.rb
Gemspec/DevelopmentDependencies:
Exclude:
- 'docker_registry2.gemspec'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: Severity, Include.
# Include: **/*.gemspec
Gemspec/RequireMFA:
Exclude:
- 'docker_registry2.gemspec'

# Offense count: 1
# Configuration parameters: Severity, Include.
# Include: **/*.gemspec
Expand All @@ -20,14 +44,15 @@ Lint/ShadowingOuterLocalVariable:

# Offense count: 5
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: AutoCorrect.
Lint/UselessAssignment:
Exclude:
- 'lib/registry/registry.rb'
- 'test/test.rb'

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: CheckForMethodsWithNoSideEffects.
# Configuration parameters: AutoCorrect, CheckForMethodsWithNoSideEffects.
Lint/Void:
Exclude:
- 'lib/registry/registry.rb'
Expand Down Expand Up @@ -76,14 +101,12 @@ Style/Documentation:
- 'lib/registry/blob.rb'
- 'lib/registry/registry.rb'

# Offense count: 6
# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
# SupportedShorthandSyntax: always, never, either, consistent
Style/HashSyntax:
# Configuration parameters: AllowedVars.
Style/FetchEnvVar:
Exclude:
- 'lib/registry/registry.rb'
- 'test/test.rb'

# Offense count: 2
# Configuration parameters: AllowedMethods.
Expand All @@ -92,6 +115,13 @@ Style/OptionalBooleanParameter:
Exclude:
- 'lib/registry/registry.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: Methods.
Style/RedundantArgument:
Exclude:
- 'lib/registry/registry.rb'

# Offense count: 8
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
Expand Down
2 changes: 1 addition & 1 deletion lib/registry/registry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def parse_link_header(header)
links = {}

# Parse each part into a named link
parts.each do |part, _index|
parts.each_key do |part|
section = part.split(';')
url = section[0][/<(.*)>/, 1]
name = section[1][/rel="?([^"]*)"?/, 1].to_sym
Expand Down

0 comments on commit 4c130c9

Please sign in to comment.