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

Added rubocop for code style consistency #115

Merged
merged 3 commits into from
Aug 12, 2024

Conversation

noahfpf
Copy link
Contributor

@noahfpf noahfpf commented Jul 19, 2024

This PR includes three commits (that can be squashed before merging):

  1. Added rubocop (and related gems) and autogenerated a config file that matches enabled cops to the existing code style. Also added rubocop step to GitHub actions.
  2. Manually disabled a few cops that depend on arbitrarily chosen lengths (e.g. Metrics/MethodLength).
  3. Enabled some cops and fixed related warnings.

For the last commit, I chose cops that were very easy to update the code to adhere to and, in some cases, relate to preventing bugs. I mostly avoided cops that involve more personal code style preferences (e.g. spacing, alignment, naming). If those changes don't follow this project's preferred styling, I'm happy to roll some or all of them back.

@pokonski
Copy link
Contributor

pokonski commented Aug 8, 2024

This looks great! Appreciate you taking steps to minimize the changes that default Rubocop would probably generate 😁

…tency

Auto-generated the `.rubocop.yml' file to follow existing styles with:

    rubocop --auto-gen-config --exclude-limit 0

Added running rubocop to github action script.
Chose cops that were very easy to update the code to adhere to and, in some cases,
relate to preventing bugs. Mostly avoided cops that involve more person code style
preferences (e.g. spacing, alignment, naming).
@pokonski pokonski merged commit 7997911 into chaps-io:master Aug 12, 2024
12 checks passed
@noahfpf noahfpf deleted the rubocop branch August 19, 2024 13:02
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.

2 participants