rubocop / rubocop/ruby-style-guide
[Idea] Write "good" before "bad" examples
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 16.5k
- Forks
- 3.3k
- PR merge metrics
- No merged PRs in 30d
Description
I have found the Ruby Style Guide while I was trying to find out which case conventions the Ruby community uses for methods.
Fortunately there's a Ruby Style Guide (thanks!) and I quickly found the Snake Case for Symbols, Methods and Variables section. I didn't know by heart what "snake case" is (I always confuse the case style names and "snake" doesn't say anything to me) so I had a look at the examples.
Here a screenshot how my gaze went:

After 1, 2, 3 was a bit of uncertainness. So after a short pause (color now turquouise instead of red) I discovered 4 (grey and discreet), had to look for 5 and finally found 6, which was the answer for my question.
My suggestions are to
- write the "Good" examples before the "Bad" examples and
- maybe disable syntax highlighting for "Bad" examples (or mark them as bad somehow else which is more intuitive than the comment, which may also be above the current view).
I hope my suggestion is placed correctly here.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Search the Ruby Style Guide for the “Snake Case for Symbols, Methods and Variables” section, then review how its Good and Bad examples are presented. Done means Good examples appear first and Bad examples are more clearly distinguished, including consideration of the syntax-highlighting suggestion; verify the rendered guide visually.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100