Skip to content

Fix the remaining RuboCop offenses - #115

Merged
paracycle merged 3 commits into
mainfrom
ufuk/rubocop-todo-fixes
Oct 27, 2026
Merged

paracycle merged 3 commits into
mainfrom
ufuk/rubocop-todo-fixes

Conversation

@paracycle

Copy link
Copy Markdown
Member

Motivation

#114 added .rubocop_todo.yml for 5 offenses that RuboCop does not autocorrect. The todo file excludes whole files from these cops, so new offenses in those files also pass without notice.

Changes

  • Remove spec.add_development_dependency('bundler') from the gemspec (Gemspec/DevelopmentDependencies). Bundler runs every bundle command, and Gemfile.lock pins its version.
  • Remove the Metrics/LineLength directives from spec/client/apps_spec.rb (Lint/RedundantCopDisableDirective). RuboCop renamed the cop to Layout/LineLength, and the rubocop-shopify configuration disables it, so the directives have no effect.
  • Define Oktakit.new, Oktakit::Error.from_response and Oktakit::Error.error inside class << self blocks (Style/ClassMethodsDefinitions). The methods stay public class methods with the same behavior.
  • Delete .rubocop_todo.yml and the inherit_from line in .rubocop.yml, because no offenses remain.

Bundler runs every bundle command, and Gemfile.lock pins its version. The gemspec dependency adds nothing, and it violates Gemspec/DevelopmentDependencies.
The directives disable Metrics/LineLength, which RuboCop renamed to Layout/LineLength. The rubocop-shopify configuration disables Layout/LineLength, so the directives have no effect.
rubocop-shopify enforces the self_class style for Style/ClassMethodsDefinitions. This removes the last entry from .rubocop_todo.yml, so the todo file is deleted.
@paracycle
paracycle merged commit 73cda5b into main Oct 27, 2026
5 checks passed
@paracycle
paracycle deleted the ufuk/rubocop-todo-fixes branch October 27, 2026 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant