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

rubocop fixing offenses related to rubocop upgrade #3319

Merged
merged 24 commits into from
Sep 19, 2019

Conversation

thilton-oddball
Copy link
Contributor

Description of change

Fixing Rubocop offenses. Commits broken out by specific Cops.

@thilton-oddball thilton-oddball requested review from a team as code owners September 19, 2019 16:18
@va-vfs-bot va-vfs-bot temporarily deployed to tjh-rubocop-fixing-offenses/master September 19, 2019 17:11 Inactive
@annaswims annaswims changed the title Tjh rubocop fixing offenses rubocop fixing offenses related to rubocop upgrade Sep 19, 2019
@annaswims
Copy link
Contributor

Please make sure you're starting your new branch from master. This branch looks like it was branched from tjh-upgrade-rubocop. Because we use squash-and-merge when we merge PR's we generally don't want to merge from a non-master branch.

A quick way to straighten this out:

  1. git rebase -i master
  2. drop the commits from the other branch
drop 66cec0607 Upgrading Rubocop to 0.74.0 and adding in rubocop-rails gem.
drop 2b8180891 Changing 422 to :unprocessable_entity in param_validators and removing a couple of comments from rubocop.yml
drop ace9a89e0 removing unnecessary disable all cops from file
drop 0c70a494a removing trailing whitespace from file
pick 600acf2e5 Fixing Rubocop Layout/ClosingHeredocIndentation offenses.
pick 5ea0fba16 Fixing Rubocop Layout/ClosingParenthesisIndentation offenses.
pick 05077822c Fixing Rubocop Layout/EmptyComment offenses.
pick 40cf3f0ef Fixing Rubocop Layout/EmptyLinesAroundBlockBody offenses.
pick da68dbd44 Fixing Rubocop Layout/IndentationWidth offenses.
pick d30fa9b8b Fixing Rubocop Layout/LeadingBlankLines offenses.
pick 08e27bc15 Fixing Rubocop Layout/RescueEnsureAlignment offenses.
pick 73d494eee Fixing Rubocop Layout/SpaceAroundOperators offenses.
pick 119b92175 Fixing Rubocop Lint/BigDecimalNew offenses.
pick 8a91732a9 Fixing Rubocop Lint/SafeNavigationConsistency offenses.
pick 2d4a62e11 Fixing Rubocop Lint/UnneededCopDisableDirective offenses.
pick 7c5c71f25 Fixing Rubocop Lint/UnneededCopEnableDirective offenses.
pick 40fa3cb09 Fixing Rubocop Rails/HttpStatus offenses.
pick ade1bcda1 Fixing Rubocop Style/ExpandPathArguments offenses.
pick b4c1a4fef Fixing Rubocop Style/MutableConstant offenses.
pick f6f02cf49 Fixing Rubocop Style/TrailingCommaInArrayLiteral offenses.
pick 79e6538b6 Fixing Rubocop Style/TrailingCommaInHashLiteral offenses.
pick b8daf5bfe Fixing Rubocop Style/UnneededCondition offenses.
pick 07f388cf1 Fixing Rubocop Style/UnneededSort offenses.
  1. force-push your branch git push -f origin tjh-rubocop-fixing-offenses

@@ -26,7 +26,7 @@ class Model < Common::RedisStore
private

def get_identifier
@id ? @id : @user.uuid
@id || @user.uuid
Copy link
Contributor

Choose a reason for hiding this comment

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

I like this new recommendation!

@@ -18,7 +18,7 @@ def bucket
# Obtain the first ObjectVersion for a given key.
def first_version(key)
versions = bucket.object_versions(prefix: key)
versions.sort_by(&:last_modified).first
versions.min_by(&:last_modified)
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 cool. I had no idea about this method.

Layout/AlignHash:
Enabled: false

# Offense count: 3
Copy link
Contributor

Choose a reason for hiding this comment

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

Might as well delete the commented out rules.

@va-vfs-bot va-vfs-bot temporarily deployed to tjh-rubocop-fixing-offenses/master September 19, 2019 18:46 Inactive
@thilton-oddball thilton-oddball force-pushed the tjh-rubocop-fixing-offenses branch from ba4d8a8 to 2187110 Compare September 19, 2019 19:25
@va-vfs-bot va-vfs-bot temporarily deployed to tjh-rubocop-fixing-offenses/master September 19, 2019 19:58 Inactive
@annaswims annaswims self-requested a review September 19, 2019 20:10
Copy link
Contributor

@annaswims annaswims left a comment

Choose a reason for hiding this comment

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

Looks Great! Thanks!

@va-vfs-bot va-vfs-bot temporarily deployed to tjh-rubocop-fixing-offenses/master September 19, 2019 20:16 Inactive
@thilton-oddball thilton-oddball merged commit 27f57c6 into master Sep 19, 2019
@thilton-oddball thilton-oddball deleted the tjh-rubocop-fixing-offenses branch September 19, 2019 20:17
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.

3 participants