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

Update to rubocop 1.13.0 and re-enable Bundler/GemComment. #44

Merged
merged 6 commits into from Jul 7, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .rubocop.yml
Expand Up @@ -2,7 +2,7 @@ inherit_from:
- conf/rubocop.yml

AllCops:
TargetRubyVersion: 2.4
TargetRubyVersion: 2.5
Copy link
Member

Choose a reason for hiding this comment

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

Should be bump this (and the minimum Ruby version in the gemspec) to Ruby 2.6 since Ruby 2.5 is EOL now?


Layout/LineLength:
Exclude:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,9 @@
# salsify_rubocop

## 1.1.0
- Re-enable version specifier checks for the `Bundler/GemComment` cop, for limiting version specifiers only.
- Upgrade to `rubocop` v1.13.0

## 1.0.2
- Disable version specifier checks for the `Bundler/GemComment` cop until https://github.com/rubocop/rubocop/pull/9358
is merged.
Expand Down
6 changes: 5 additions & 1 deletion conf/rubocop_without_rspec.yml
@@ -1,3 +1,7 @@
require:
- rubocop-performance
- rubocop-rails
Copy link
Member

Choose a reason for hiding this comment

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

Why did we need this change? If we do need it, should the rubocop-rails require go in rubocop_rails.yml?

Copy link
Contributor Author

@ric2b ric2b Jun 24, 2021

Choose a reason for hiding this comment

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

@jturkel The need for this is that otherwise we get these errors:
image

As for moving require: rubocop-rails to rubocop_rails.yml, the issue is that this file has the following lines:

Rails:
Enabled: false

Copy link
Member

Choose a reason for hiding this comment

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

I guess this gem depends on rubocop-rails even if the project isn't using Rails so this should be innocuous.


AllCops:
NewCops: disable
DisplayCopNames: true
Expand All @@ -10,10 +14,10 @@ AllCops:
- 'tmp/**/*'
- 'vendor/**/*'

# Don't check version_specifiers until https://github.com/rubocop/rubocop/pull/9358 merges
Bundler/GemComment:
Enabled: true
OnlyFor:
- 'restrictive_version_specificiers'
- 'source'
- 'git'
- 'github'
Expand Down
2 changes: 1 addition & 1 deletion lib/salsify_rubocop/version.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module SalsifyRubocop
VERSION = '1.0.2'
VERSION = '1.1.0'
end
4 changes: 2 additions & 2 deletions salsify_rubocop.gemspec
Expand Up @@ -30,14 +30,14 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ['lib']

spec.required_ruby_version = '>= 2.4'
spec.required_ruby_version = '>= 2.5'

spec.add_development_dependency 'bundler', '~> 2.0'
spec.add_development_dependency 'rake', '~> 13.0'
spec.add_development_dependency 'rspec', '~> 3.0'
spec.add_development_dependency 'rspec_junit_formatter'

spec.add_runtime_dependency 'rubocop', '~> 1.0.0'
spec.add_runtime_dependency 'rubocop', '~> 1.13.0'
spec.add_runtime_dependency 'rubocop-performance', '~> 1.5.0'
spec.add_runtime_dependency 'rubocop-rails', '~> 2.4.0'
spec.add_runtime_dependency 'rubocop-rspec', '~> 2.0.0'
Expand Down