Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some RuboCop offenses #203

Merged
merged 5 commits into from
Oct 9, 2023
Merged

Fix some RuboCop offenses #203

merged 5 commits into from
Oct 9, 2023

Conversation

ydah
Copy link
Contributor

@ydah ydah commented Sep 26, 2023

Running RuboCop on the latest of the main branch results in the following offenses:

❯ bundle exec rubocop        
Inspecting 27 files
...C......C............C...

Offenses:

grover.gemspec:35:3: C: Gemspec/DevelopmentDependencies: Specify development dependencies in Gemfile.
  spec.add_development_dependency 'mini_magick', '~> 4.12'
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
grover.gemspec:36:3: C: Gemspec/DevelopmentDependencies: Specify development dependencies in Gemfile.
  spec.add_development_dependency 'pdf-reader', '~> 2.11'
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
grover.gemspec:37:3: C: Gemspec/DevelopmentDependencies: Specify development dependencies in Gemfile.
  spec.add_development_dependency 'rack-test', '~> 1.1'
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
grover.gemspec:38:3: C: Gemspec/DevelopmentDependencies: Specify development dependencies in Gemfile.
  spec.add_development_dependency 'rake', '~> 13.0'
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
grover.gemspec:39:3: C: Gemspec/DevelopmentDependencies: Specify development dependencies in Gemfile.
  spec.add_development_dependency 'rspec', '~> 3.12'
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
grover.gemspec:40:3: C: Gemspec/DevelopmentDependencies: Specify development dependencies in Gemfile.
  spec.add_development_dependency 'rubocop', '~> 1.43'
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
grover.gemspec:41:3: C: Gemspec/DevelopmentDependencies: Specify development dependencies in Gemfile.
  spec.add_development_dependency 'rubocop-rake', '~> 0.6'
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
grover.gemspec:42:3: C: Gemspec/DevelopmentDependencies: Specify development dependencies in Gemfile.
  spec.add_development_dependency 'rubocop-rspec', '~> 2.18'
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
grover.gemspec:44:3: C: Gemspec/DevelopmentDependencies: Specify development dependencies in Gemfile.
  spec.add_development_dependency 'simplecov', '~> 0.17', '< 0.18'
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/grover/middleware.rb:73:7: C: [Correctable] Style/ReturnNilInPredicateMethodDefinition: Return false instead of nil in predicate methods.
      return unless ignore_request.is_a?(Proc)
      ^^^^^^
spec/grover/processor_spec.rb:87:84: C: [Correctable] Style/RedundantRegexpArgument: Use string '"puppeteer"' as argument instead of regexp /"puppeteer"/.
            File.write('package.json', File.open('package.json') { |f| f.read.gsub(/"puppeteer"/, '"puppeteer-tmp"') })
                                                                                   ^^^^^^^^^^^^^
spec/grover/processor_spec.rb:407:71: C: [Correctable] RSpec/MetadataStyle: Use symbol style for metadata.
      context 'when passing through launch params to remote browser', remote_browser: true do
                                                                      ^^^^^^^^^^^^^^^^^^^^
spec/grover/processor_spec.rb:904:61: C: [Correctable] RSpec/MetadataStyle: Use symbol style for metadata.
      context 'when using remote browser option with HTML', remote_browser: true do
                                                            ^^^^^^^^^^^^^^^^^^^^

27 files inspected, 13 offenses detected, 4 offenses autocorrectable

Copy link
Contributor

@abrom abrom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one, thanks @ydah

Comment on lines +9 to +10
Gemspec/DevelopmentDependencies:
EnforcedStyle: gemspec
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine, but I don't see a reason why we can't move the dev dependencies into the Gemfile though. I'm all for consistency 😄

@abrom abrom merged commit 156ef96 into Studiosity:main Oct 9, 2023
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.

None yet

2 participants