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

Add rubocop #48

Merged
merged 6 commits into from
Sep 7, 2023
Merged

Add rubocop #48

merged 6 commits into from
Sep 7, 2023

Conversation

ddecollo
Copy link
Contributor

@ddecollo ddecollo commented Aug 3, 2023

Fixes #30

@ddecollo ddecollo requested a review from ajkiessl August 3, 2023 14:41
Copy link
Contributor

@ajkiessl ajkiessl 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 for doing this; it'll help keep things clean moving forward. One thing I noticed in the rubocop output is this message:

Tip: Based on detected gems, the following RuboCop extension libraries might be helpful:

I think it would be a good idea to add these extensions in if possible. They'll give us more linting coverage.

@ddecollo ddecollo requested a review from ajkiessl August 8, 2023 15:12
Copy link
Contributor

@ajkiessl ajkiessl left a comment

Choose a reason for hiding this comment

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

A couple things. I have one comment below 👇 . Also, I think we need to add this:


AllCops:
    NewCops: enable

to the rubocop.yml. I think this should get around the error. It also might fix the issue below.

- run:
name: "Rubocop-Rspec"
command: |
docker-compose exec web bundle exec rubocop -R --only RSpec
Copy link
Contributor

@ajkiessl ajkiessl Aug 9, 2023

Choose a reason for hiding this comment

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

I don't think you need to split these up. Just running rubocop should cover the others. It's been a while since I've set up rubocop, though, so i may be wrong. If they're not running together, then we should find a way to get them to run together.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is running with Rubocop. This command would give the option to only run on Rubocop for Rspec.

Copy link
Contributor

Choose a reason for hiding this comment

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

I mean that just running bundle exec rubocop should run all the cops (basic rubocop, rails, and rspec). We don't want to split it up into 3 different instances.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They run together. This is just an additional option to only run rubocop for rspec

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, then we should remove the rubocop-rails and rubocop-rspec CI "run" instances and just do the regular rubocop one. When we meet again we should go over how CI works and how these configs work to run certain commands.

@ddecollo ddecollo requested a review from ajkiessl August 9, 2023 18:17
ajkiessl
ajkiessl previously approved these changes Sep 7, 2023
@ddecollo ddecollo merged commit 924780b into main Sep 7, 2023
4 checks passed
@ajkiessl ajkiessl deleted the 30_add_rubocop branch September 7, 2023 19:13
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.

Add Rubocop to CI
2 participants