Skip to content

SRCH-5787: Replace existing searchgov style gem with rubocop gem#369

Merged
luisgmetzger merged 2 commits into
GSA:mainfrom
luisgmetzger:SRCH-5787
Apr 2, 2025
Merged

SRCH-5787: Replace existing searchgov style gem with rubocop gem#369
luisgmetzger merged 2 commits into
GSA:mainfrom
luisgmetzger:SRCH-5787

Conversation

@luisgmetzger
Copy link
Copy Markdown
Contributor

@luisgmetzger luisgmetzger commented Apr 1, 2025

Summary

  • This PR removes the existing searchgov style gem for rubocop cop configs.
  • This PR adds latest rubocop gems and plugin gems for rubocop.
  • This PR updates all configs regarding rubocop including README file on how to use.

JIRA Ticket: https://cm-jira.usa.gov/browse/SRCH-5787

Checklist

Please ensure you have addressed all concerns below before marking a PR "ready for review" or before requesting a re-review. If you cannot complete an item below, replace the checkbox with the ⚠️ :warning: emoji and explain why the step was not completed.

Functionality Checks

  • You have merged the latest changes from the target branch (usually main) into your branch.

  • Your primary commit message is of the format SRCH-#### <description> matching the associated Jira ticket.

  • PR title is either of the format SRCH-#### <description> matching the associated Jira ticket (i.e. "SRCH-123 implement feature X"), or Release - SRCH-####, SRCH-####, SRCH-#### matching the Jira ticket numbers in the release.

  • Automated checks pass. If Code Climate checks do not pass, explain reason for failures:

Process Checks

  • You have specified at least one "Reviewer".

Comment thread Gemfile Outdated
# https://github.com/GSA/searchgov_style/blob/main/.codeclimate.yml
gem 'searchgov_style', '~> 0.1', require: false
gem 'rubocop', require: false
gem 'rubocop-discourse', require: false
Copy link
Copy Markdown
Contributor

@stevenbarragan stevenbarragan Apr 1, 2025

Choose a reason for hiding this comment

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

We don't need this! Please remove it. Same with rubocop-minitest.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@stevenbarragan - I have removed the gems. Although, even with it gone, I am still not able to run the bundle exec rubocop --auto-gen-config command successfully. As mentioned, might be a local issue if you plan on testing this in your machine.

Copy link
Copy Markdown
Contributor

@stevenbarragan stevenbarragan left a comment

Choose a reason for hiding this comment

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

Please remove unnecessary dependencies and clean commit history.

Comment thread .rubocop_todo.yml Outdated
# Offense count: 4
# Configuration parameters: Include.
# Include: app/controllers/**/*
Discourse/Plugins/CallRequiresPlugin:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You need to anything discourse related!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@stevenbarragan - I have removed all related items to discourse from changes ... including inline comments from offenses.

@luisgmetzger
Copy link
Copy Markdown
Contributor Author

luisgmetzger commented Apr 1, 2025

Please remove unnecessary dependencies and clean commit history.

Was able to fix the history issue with commits.

@stevenbarragan
Copy link
Copy Markdown
Contributor

stevenbarragan commented Apr 1, 2025

You don't need to pull but rebase main into your branch. Maybe you can run a rebase -i (interactive) to pick the commits you want to push.

Check this https://medium.com/@tigerasks/git-gud-b29c11ab2c60 and https://www.reddit.com/r/git/comments/18thhel/maintain_a_semilinear_history/?rdt=49382

I actually just changed my comment to got it updated. Yeah, it looks like my forked branches where pretty far behind. Without interactive rebase, it would have continued to add other commits to my merger. Should be good now

@luisgmetzger luisgmetzger merged commit f3be932 into GSA:main Apr 2, 2025
@luisgmetzger luisgmetzger deleted the SRCH-5787 branch April 2, 2025 16:22
luisgmetzger added a commit that referenced this pull request Apr 2, 2025
SRCH-5787: Replace existing searchgov style gem with rubocop gem (#369)
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