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

Support Standard RB? #110

Open
jon-sully opened this issue Sep 17, 2024 · 3 comments
Open

Support Standard RB? #110

jon-sully opened this issue Sep 17, 2024 · 3 comments

Comments

@jon-sully
Copy link

First of all, big fan of this library. I've used it a few times now and it's just the best. Thank you so much for your continued work on it and attention to detail, Matt!

Just had one thought / question around linting / formatting. I love that nextgen comes with Rubocop linting but I tend to use Standard RB on more projects nowadays. Curious if that's in the future gamut for you here.

@mattbrictson
Copy link
Owner

The short answer to your question: I'm aware of standard but I have not used it in a real-world project. In the short term, I probably won't be adding it to nextgen. My focus right now is adding Rails 8 support.

That said, as the OP of #47 suggested, I can imagine nextgen evolving at some point to ask more targeted questions instead of showing a single giant list of optional generators. I also recognize that RuboCop is a particularly confusing/contentious aspect of Rails these days, and nextgen could help provide some clarity.

Perhaps a new question like this:

Would you like to enforce Ruby code style?
‣ Use RuboCop via rubocop-rails-omakase (default)
  Use RuboCop with an opinionated nextgen config
  Use Standard
  No

@jon-sully
Copy link
Author

Totally understand. Is it something you'd accept a minimal PR for, or something you're feeling a little tighter around right now?

@mattbrictson
Copy link
Owner

If the PR is pretty small, yes, I think this month would be a good time to fold it in.

An easy way to do it might be to add a Standard generator to Nextgen's generators.yml with the constraint requires: skip_rubocop, and add a corresponding RailsOptions#skip_rubocop? helper method. This will ensure that Standard only appears as an option when the user opts out of the RuboCop config provided by Rails 7.2+.

Then, the Standard generator will need to:

  1. Install the standardrb gem.
  2. Ideally add the appropriate Standard rake tasks to Nextgen's generated Rakefile so that rake and rake fix run Standard alongside other linters.
  3. Update the rails new-generated GitHub Actions ci.yml workflow to add a Standard job.

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

No branches or pull requests

2 participants