rubocop / rubocop/ruby-style-guide
Prefer `drop` over `slice` (or `shift`) to retrieve all but the first array element
Open
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
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
Start by reading the linked TIL article and Ruby Array#drop documentation, then inspect the style guide for guidance on retrieving all but the first array element. Determine whether the guide should prefer drop over slice or shift, and update the relevant guidance so the recommendation is explicit.
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
- 35/100