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

Linting and RuboCop: Unclear what "the" Gem is. #28269

Closed
2 of 3 tasks
scheals opened this issue Jun 24, 2024 · 7 comments · Fixed by #28299
Closed
2 of 3 tasks

Linting and RuboCop: Unclear what "the" Gem is. #28269

scheals opened this issue Jun 24, 2024 · 7 comments · Fixed by #28299
Labels
Status: Help Wanted This issue can be assigned to other contributors Type: Easy Fix Involves a minor fix such as grammar, syntax, etc.

Comments

@scheals
Copy link
Contributor

scheals commented Jun 24, 2024

Checks

Describe your suggestion

There is an example of locally installing a plugin for RuboCop in You are the code dictator section that confuses learners due to the wording:

Since RuboCop is extensible, there exist other departments that you can use - like Performance or RSpec. You could even write your own Cop! The process of adding an extension is easy: you install the Gem locally and modify .rubocop.yml.

I'm ESL and when I wrote this my train of thought was "the Gem you are interested in, Performance, RSpec, your own Cop". Perhaps it should be "a Gem" or "the Gem(s) you chose".

Example confusion seen on discord

Path

Ruby / Rails

Lesson Url

https://www.theodinproject.com/lessons/ruby-linting-and-rubocop

(Optional) Discord Name

No response

(Optional) Additional Comments

No response

@SumonGFC
Copy link
Contributor

Hi @scheals
I do think this section is a bit confusing mainly because of the "metaphor" of cops/departments.

"Since RuboCop is extensible, there exist other departments that you can use - like Performance or RSpec."

I think this line might be less ambiguous if were phrased like:

"There are many gems you can install that will extend RuboCop like rubocop-rspec or rubocop-performance.

Also, on line 180 I think it would be helpful to specify that the line in the proceeding codeblock should be added to the GemFile (and not the .rubocop.yml file)

@scheals
Copy link
Contributor Author

scheals commented Jun 27, 2024

Hi @scheals I do think this section is a bit confusing mainly because of the "metaphor" of cops/departments.

"Since RuboCop is extensible, there exist other departments that you can use - like Performance or RSpec."

I think this line might be less ambiguous if were phrased like:

"There are many gems you can install that will extend RuboCop like rubocop-rspec or rubocop-performance.

Also, on line 180 I think it would be helpful to specify that the line in the proceeding codeblock should be added to the GemFile (and not the .rubocop.yml file)

That line codeblock after line 180 should go to the Gemfile. Now, it might be because I was duped by VSCode extensions in the past but I do not recall having to do anything else for RuboCop to pick those extensions up, but the official docs seem to suggest an entry in the .rubocop.yml also is required, but since it is a YAML file, it has to be formatted differently:
image
https://github.com/rubocop/rubocop-performance?tab=readme-ov-file#usage

So yeah, this needs to be added as well.

@CouchofTomato CouchofTomato added Status: Help Wanted This issue can be assigned to other contributors Type: Easy Fix Involves a minor fix such as grammar, syntax, etc. labels Jun 27, 2024
@SumonGFC
Copy link
Contributor

@scheals Okay, I think I have a good idea of how to help make this section a bit more clear and that would address the issues we've discussed so far. I can submit a PR for you to review. If you like the changes we can merge it, or if you think it could be better we can discuss further. Sound good?

@scheals
Copy link
Contributor Author

scheals commented Jun 28, 2024

@SumonGFC
I have no power here :) But I believe when maints see that you're up to fixing this, they'll assign you the issue and then give you the green light for working on a PR, then review it with you.

@SumonGFC
Copy link
Contributor

@scheals right okay haha. I value your input however, as you are the one who wrote this lesson.

@CouchofTomato
Copy link
Member

Feel free to submit a PR @SumonGFC

@SumonGFC
Copy link
Contributor

PR submitted. Please let me know if you have any thoughts/criticisms/suggestions to improve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Help Wanted This issue can be assigned to other contributors Type: Easy Fix Involves a minor fix such as grammar, syntax, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants