-
Notifications
You must be signed in to change notification settings - Fork 598
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
RuboCop - enable new cops, address new issues #1220
Conversation
- default to enabling new cops as they are released - address all current issues with cops we didn't previously have enabled - disable certain cops and place TODO reminders alongside them for future enabling
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome proactivity! Thanks for taking this on, James!
Also, branch ref? https://robocop.fandom.com/wiki/Clara_Murphy
@@ -13,4 +13,5 @@ Gem::Specification.new do |spec| | |||
f.match(%r{^(test|spec|features)/}) | |||
end | |||
spec.require_paths = ["lib"] | |||
spec.metadata['rubygems_mfa_required'] = 'true' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious -- why add this here?
Also, have you done any absorbing of this gem? I'm somewhat skeptical about its contemporary relevance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a new cop, Gemspec/RequireMFA
, that insists on this line being present in gemspec files. I don't know if we're ready to start using that declaration yet for our 2 main gemspec files, so I have disabled the cop for now and left those files untouched. But for this file that is basically a fixture file, I figured it was ok to leave the rubocop -a
driven addition.
Whoops, approved and then noticed the failures. My bad. |
Yep! I was referring to RoboCop's last name, shared with his wife Clara. |
`Gemspec/DateAssignment` -> `Gemspec/DeprecatedAttributeAssignment`
bring compliance with the latest RuboCop v1.31.0 cops and defaults
update the metric data test to reflect the change made to MetricData.hash
@@ -33,7 +33,7 @@ def metric_spec= new_spec | |||
end | |||
|
|||
def hash | |||
metric_spec.hash ^ stats.hash | |||
[metric_spec, stats].hash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -11,8 +11,8 @@ | |||
|
|||
executes do | |||
::NewRelic::Agent.logger.info 'Installing Rails Sunspot instrumentation' | |||
deprecation_msg = 'The instrumentation for Sunspot is deprecated.' \ | |||
' It will be removed in version 9.0.0.' \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My guess is that this trailing slash would cause issues should it ever get executed. Perhaps we've broken support for Sunspot earlier than expected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch! I guess that makes it two public-facing changes this release 😉
prevent rack-test 2+ from being installed with the Rails multiverse suite for now
`Gemspec/DateAssignment` -> `Gemspec/DeprecatedAttributeAssignment`
for JRuby's sake, leave ENV['HOME'] as-is and don't replace it with Dir.home
use libcurl4-openssl-dev to fetch libcurl
to make the local machine aware of which packages exist before attempting to fetch them, run `apt-get update` first. this will hopefully address the issue with Azure aggressively keeping only the very latest versions of some packages (libcurl is one that's known so far).
Now that the libcurl issue has been traced to `apt-get update` needing to be ran, go back to using the `libcurl4-nss-dev` package
CI: be sure to run `apt-get update` before `apt-get install`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for keeping us up to date with Rubocop and resolving the CI issues. I have a few small suggestions. Let me know when you'd like me to take another look.
@@ -11,8 +11,8 @@ | |||
|
|||
executes do | |||
::NewRelic::Agent.logger.info 'Installing Rails Sunspot instrumentation' | |||
deprecation_msg = 'The instrumentation for Sunspot is deprecated.' \ | |||
' It will be removed in version 9.0.0.' \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch! I guess that makes it two public-facing changes this release 😉
'enalbe' -> 'enable' Co-authored-by: Kayla Reopelle (she/her) <87386821+kaylareopelle@users.noreply.github.com>
- disable `Style/MapToHash` with a reminder to enable it in a Ruby 2.6+ world - update new TODO comments with a `UNIT TESTS` label for easier categorization
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
future enabling