Relax `1:n` check (false positive)

Open Beginner friendly
#256 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
r
Domain
tooling

Research direction

Start by locating BiocCheck's check for 1:n patterns and review how it distinguishes literal and variable expressions. Verify the behavior with the examples in the issue: 1:10 should not trigger the warning, while 1:n should continue to do so.

Written by the indexing model from the issue text.

Description

BiocCheck will complain on patterns such as:

1:10

But I think this is fine if the second element is an integer literal. The danger of 1: only lies when the second element is a variable is:

1:n

I believe having this check lump both cases together is doing a disservice to users as it doesn't help them understand why and when : is bad.

It also makes BiocCheck unnecessary noisy and teaches users to ignore it, even for a number of important issues currently reported in existing packages.

Dominant language
R
Stars
10
Forks
29
PR merge metrics
No merged PRs in 30d

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.

More from Bioconductor/BiocCheck

All issues in Bioconductor/BiocCheck

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.