rubocop / rubocop/ruby-style-guide

style guide doesn't follow Style/RescueStandardError

Open
#719 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

New Rule
Dominant language
No language data
Stars
16.5k
Forks
3.3k
PR merge metrics
No merged PRs in 30d

Description

This issue has 2 parts

  1. Style/RescueStandardError isn't represented at all in the style guide
  2. In particular, https://github.com/bbatsov/ruby-style-guide/tree/2c0b4713794ea07a70ca4e1dee81405350fa7544#no-blind-rescues shows that rescue => e is "good", but this line would fail against Style/RescueStandardError 's default of "explicit".

Since this cop has 2 choices (implicit and explicit), I'm not sure how to make a PR for this change to show that it's "bad" with defaults, but "good" with changes (not even sure the guide cares about those choices)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the style-guide section linked in the issue and compare its rescue guidance with Style/RescueStandardError's implicit and explicit choices. Update the guide so the cop is represented and the rescue => e example clearly reflects the relevant default or configuration. Done means both parts of the discrepancy are addressed consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.