-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
wip: add Rubocop and Linting lesson #27794
Conversation
@JoshDevHub Be frank with me and I hope that the content looks good :D |
I'm on triage this week, so it might take me a few days to read through this more thoroughly. Looking pretty good though! Will be awesome to have this content in the curriculum. |
No worries, focus on the triage :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of comments so far. I think it's pretty awesome. Let me know if you want any input on any of the Todo items.
Co-authored-by: Josh Smith <[email protected]>
Thanks! Hmmm, I haven't really directly defined linting and formatting and I wonder if that's a problem. Formatting is probably clear enough on its own but perhaps it'd be good to make a clear distinction between the two? Perhaps just linking to the wiki page of Linting in the assignment is going to be enough. Not sure. Also not super confident in my ABC/Cyclomatic/Perceived metric explanations. (Hope this is on-topic, this is how I understood Todo items :) ) |
HI, "This is even more important now because of Ruby LSP requiring a locally installed RuboCop for linting and formatting to work." As I checked the latest Rbuy-LSP version, it is no longer true. It doesn't require rubucop when I create new project. |
Hi @scheals, my bad, look like I misread. What I mean is now Ruby-LSP run without a Gemfile. It still requires rubocop to lint and format, as expected. If it's not in the bundle, or Gemfile doesn't exist, then Ruby-LSP still works, but won't be able to do linting. |
Ahh no worries. Yeah, in the meantime Ruby LSP fixed it not working without a Gemfile but I still find its activation rather hit and miss - often I open a Ruby project and Ruby LSP only opens after I close-reopen a Ruby file for it to pick up that I'm working on a Ruby file. I'm expecting looots of questions about this - I imagine that the bit I have proposed to change in
Will not be sufficient and instructions how to make Ruby LSP start without a Gemfile are going to be needed. |
- Assignment - Knowledge check - Additional resources
So, in the
and I am not sure whether I've kept it as of current draft. The lesson does introduce how to use RuboCop in VSCode but doesn't really talk about the differences in what RuboCop in the CLI can do and what RuboCop integration in VSCode can't do and vice versa. Perhaps this should be changed to:
which would be OK for the current content. I have "finalized" the assignment and the additional resources and have proposed a rather long list of knowledge checks. I took a quick glance at the freshly revamped React course and I found at least one lesson with similar check count, so perhaps it is A-OK and I can start filling in the anchors. Strongly believe that including Sandi Metz' talk on Rules in the Assignment section is the way to go. I gave it a re-listen and it is even better than I remembered it. Thrown out a link to RuboCop's GH repo as the docs would have the same information anyway. Material related to Standard was also removed although I'm still waiting for clarification as to what is needed to be done with the mention of Standard in the lesson content itself - I'll clear that up together with the common config issues then. |
This lesson looks great @scheals I'm a fan of your knowledge checks, so feel free to go ahead and start filling in the anchors whenever you want. Also love that Sandi Metz talk and I'm glad to have it in the assignment. Was there any other specific thing you were concerned about or want me to respond to? |
- also remove the bit about Standard and hammer the point about defaults a lil' harder
I'm very glad to hear that @JoshDevHub :D So, I had to include an explicit definition of linting and formatting in the lesson itself, otherwise the anchors would not be as straightforward and might've lead to confusion. I've dropped mention of Standard and brought instructions on how to change particular rules and how to inherit configuration from other I wonder if the install/run knowledge checks aren't too close to each other and overall too laconic:
On one hand, it is just that easy and this knowledge should be present due to the previous Bundler lesson but I wonder if those two knowledge checks should be merged into one. But perhaps the questions themselves being there are important, to check whether folks actually know. As for requests - please check the Metrics section to make sure it is clear and correct :) In short:
|
I think the order is great. The lesson flows very well in my opinion. There may be an argument later to split this up (the same way we're thinking of splitting up the bundler / project organization lesson). Maybe there can be a Introduction/setup lesson and then a lesson for configuration? I'm fine to shift this to a different PR though.
I think it's great! Wish I had it while I was learning 😆
They all seem good to me 👍 |
@scheals Can you try to merge upstream Also feel free to mark this as ready for review. One thing was curious for your thoughts on: where do you think the two new lessons should be positioned within the Ruby course? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with that placement I think.
Also this PR should be good to go. Here are the next steps:
- Merge the bundler lesson and this one (I'll handle this of course)
- Add the 2nd PR for the images in this lesson. You can follow our guide for adding images if you've never done this. Basically this adds the images to our CDN setup.
- PR to the main site repo that adds the lessons. You can find the guide for that on the main site repo's wiki
After that, we should be done 🥳
Because
We never had a dedicated lesson for Linting and Rubocop. This is even more important now because of Ruby LSP requiring a locally installed RuboCop for linting and formatting to work.
This PR
Issue
Closes #27091
Additional Information
Pull Request Requirements
location of change: brief description of change
format, e.g.Intro to HTML and CSS lesson: Fix link text
Because
section summarizes the reason for this PRThis PR
section has a bullet point list describing the changes in this PRIssue
section