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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade rubocop #27

Merged
merged 11 commits into from
Sep 27, 2021
Merged

Upgrade rubocop #27

merged 11 commits into from
Sep 27, 2021

Conversation

benreyn
Copy link
Contributor

@benreyn benreyn commented Aug 27, 2021

Opening this up as a draft. CI ended up failing on this version for some indeterminate reason. Spent a cycle on it myself and then asked @cupakromer for a second set of eyes. We couldn't figure it out quickly, so we are punting the fix to next week. 馃憻 馃張

CI Passing! This chunk of updates is ready for everyone to review!

benreyn and others added 6 commits August 27, 2021 14:01
Co-authored-by: Aaron Hill <armahillo@gmail.com>
Co-authored-by: Aaron Kromer <cupakromer@users.noreply.github.com>
Co-authored-by: Chris Hoffman <choffman@radiusnetworks.com>
Co-authored-by: James Nebeker <jnebeker@radiusnetworks.com>
Co-authored-by: JC Avena <jcavena@gmail.com>
Co-authored-by: Aaron Hill <armahillo@gmail.com>
Co-authored-by: Aaron Kromer <cupakromer@users.noreply.github.com>
Co-authored-by: Chris Hoffman <choffman@radiusnetworks.com>
Co-authored-by: James Nebeker <jnebeker@radiusnetworks.com>
Co-authored-by: JC Avena <jcavena@gmail.com>
Co-authored-by: Aaron Hill <armahillo@gmail.com>
Co-authored-by: Aaron Kromer <cupakromer@users.noreply.github.com>
Co-authored-by: Chris Hoffman <choffman@radiusnetworks.com>
Co-authored-by: James Nebeker <jnebeker@radiusnetworks.com>
Co-authored-by: JC Avena <jcavena@gmail.com>
Co-authored-by: Aaron Kromer <cupakromer@users.noreply.github.com>
Co-authored-by: James Nebeker <jnebeker@radiusnetworks.com>
Co-authored-by: JC Avena <jcavena@gmail.com>
Co-authored-by: Aaron Kromer <cupakromer@users.noreply.github.com>
Co-authored-by: James Nebeker <jnebeker@radiusnetworks.com>
Co-authored-by: JC Avena <jcavena@gmail.com>
Co-authored-by: Aaron Kromer <cupakromer@users.noreply.github.com>
Co-authored-by: James Nebeker <jnebeker@radiusnetworks.com>
Co-authored-by: JC Avena <jcavena@gmail.com>
@jnebeker
Copy link
Contributor

According to this comment the error we're seeing should be resolved in version 0.89:

An error occurred while Layout/LineLength cop was inspecting /Users/James/src/ruby/github.com/RadiusNetworks/radius-spec/spec/support/model_factories.rb:5:2.
can't modify frozen Array

benreyn and others added 2 commits September 24, 2021 14:16
Co-authored-by: JC Avena <jcavena@gmail.com>
Co-authored-by: Chris Hoffman <choffman@radiusnetworks.com>
Co-authored-by: Sam Kim <sam@radiusnetworks.com>
Co-authored-by: JC Avena <jcavena@gmail.com>
Co-authored-by: Chris Hoffman <choffman@radiusnetworks.com>
Co-authored-by: Sam Kim <sam@radiusnetworks.com>
Copy link
Contributor

@jnebeker jnebeker left a comment

Choose a reason for hiding this comment

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

Nineties here we come!

This benchmarks the advise for the [Style/HashLikeCase][1] check. Usage
of `case` appears to be more performant than a hash. However, both are
highly performant, so any difference is likely negligible compared to
other performance issues. Thus our decision for preference should be
based on readability and comprehension.

[1]: https://docs.rubocop.org/rubocop/1.21/cops_style.html#styleredundantfileextensioninrequire
We are now on the Rubocop version which implements the setting as we
wished it to be configured.
Copy link
Contributor

@sam-kim sam-kim left a comment

Choose a reason for hiding this comment

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

:shipit:

@benreyn benreyn merged commit 7f94fc2 into main Sep 27, 2021
@benreyn benreyn deleted the upgrade-rubocop branch September 27, 2021 18:04
benreyn added a commit that referenced this pull request Sep 30, 2021
[Full Changelog](v0.8.0...v0.9.0)

Enhancements
------------

- Upgrade to Rubocop 0.89.x (Aaron Hill, Aaron Kromer, Ben Reynolds, Chris
  Hoffman, James Nebeker, JC Avena, Sam Kim #27)
- Upgrade to Rubocop Rails 2.6.x (Aaron Hill, Aaron Kromer, Ben Reynolds, Chris
  Hoffman, James Nebeker, JC Avena, Sam Kim #27)
- Adjust common Rubocop configuration (Aaron Hill, Aaron Kromer, Ben Reynolds,
  Chris Hoffman, James Nebeker, JC Avena, Sam Kim #27)
  - Configure multiple metrics to use the `CountAsOne` option for array, hash
    and heredocs
  - Disable `Style/SlicingWithRange` as we do not care about the style
- Includes new `shared_example` / `shared_context` inclusion aliases
  `has_behavior` and `it_has_behavior` for behavior driven development language
  (Aaron Kromer, Ben Reynolds #28)

Bug Fixes
---------

None

Breaking Changes
----------------

- Change the default behavior from `:warn` to `:raise` for RSpec expectations
  behavior `on_potential_false_positives` (Aaron Kromer, Ben Reynolds #28)
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

4 participants