sumoheavy / jira-ruby

A Ruby gem for the JIRA REST API
MIT License
654 stars 412 forks source link

Initial Rubocop implementation #448

Closed bobbrodie closed 4 months ago

bobbrodie commented 4 months ago

Overview

This is the initial implementation of Rubocop. Most of the commits in this PR are stylistic and will not affect functionality at all.

Approach

I wanted to use caution in my approach here, so in general here are the steps that I followed:

First, understand what the most impactful cops are by count and autocorrect-ability:

bundle exec rubocop --format offenses

Next, choose one that's going to be on almost all files, except specs:

bundle exec rubocop --only Style/FrozenStringLiteralComment

This will give us the changeset, so we review before autocorrecting:

bundle exec rubocop --only Style/FrozenStringLiteralComment -A

Now I'll run the tests:

bundle exec rake test

If everything looks good, then check the changes:

git diff

After reviewing, add files, commit, and push.