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

dev: Add Rubocop for linting #94

Merged
merged 1 commit into from
Sep 11, 2023
Merged

dev: Add Rubocop for linting #94

merged 1 commit into from
Sep 11, 2023

Conversation

jeremy-stytch
Copy link
Contributor

@jeremy-stytch jeremy-stytch commented Sep 11, 2023

This adds a required Rubocop step to the Ruby workflow.

Rubocop accepts a configuration option for the target Ruby version, which, in our case, defaults to the lowest version number in stytch.gemspec.

For now, I think we should run Rubocop just once on that minimum/target Ruby version. But if we have a reason to run it as part of the test matrix, I think that would be fine too.

Testing

  1. Pull this PR to your local repo
  2. bundle (see that rubocop and rubocop-rspec got installed)
  3. bundle exec rubocop (should report no errors)

I also put up a PR with an intentional linter error in #95 as an example.

@jeremy-stytch jeremy-stytch force-pushed the jeremy-lint branch 4 times, most recently from 50e1e37 to 4b79261 Compare September 11, 2023 18:46
@jeremy-stytch jeremy-stytch marked this pull request as ready for review September 11, 2023 18:55
@jeremy-stytch jeremy-stytch requested a review from a team as a code owner September 11, 2023 18:55
.github/workflows/ruby.yml Outdated Show resolved Hide resolved
@jeremy-stytch jeremy-stytch merged commit ef272aa into main Sep 11, 2023
6 checks passed
@jeremy-stytch jeremy-stytch deleted the jeremy-lint branch September 11, 2023 21:02
jeremy-stytch added a commit that referenced this pull request Sep 15, 2023
In #94, I chose to disable some Rubocop groups because they weren't
related to code correctness. But this library does already conform to
most of Rubocop's default Layout and Style rules, so we can re-enable
them to keep that consistent.
jeremy-stytch added a commit that referenced this pull request Sep 15, 2023
In #94, I chose to disable some Rubocop groups because they weren't
related to code correctness. But this library does already conform to
most of Rubocop's default Layout and Style rules, so we can re-enable
them to keep that consistent.
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