insertText()'s location= argument -- is '0' a valid column number?
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- r
- Domain
- documentation
Research direction
Start with the insertText() documentation in R/document-api.R and the related implementation reference in R/code.R. Determine whether location=0 is accepted by the RStudio API, then update the documentation to state the valid column range clearly so downstream users can decide how to handle SARIF output.
Written by the indexing model from the issue text.
Description
I couldn't tell from ?insertText whether 0 is valid or not. Of course I could test this with RStudio available, but I don't have it available at the moment, so it would be good to have this written out. The source code of rstudioapi::insertText() also eventually refers to a function inside an environment only available inside RStudio, so I couldn't check that either:
https://github.com/rstudio/rstudioapi/blob/3304988af6ba2b70ec1774aa6eb31a37a75d4c7e/R/code.R#L156
Context: We have a conflict in {lintr} of 0 being a valid column number for lint objects, apparently to support RStudio:
https://github.com/r-lib/lintr/pull/2418#discussion_r1555250719
But this conflicts with SARIF format (https://github.com/r-lib/lintr/issues/2550), which requires column>0. I'd like to know if the fix is to block 0 as a column number everywhere, or if we should just block it when producing SARIF output.
To answer this I tried to refer to the {rstudioapi} documentation, but to no avail.
- Dominant language
- R
- Stars
- 175
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
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.
More from rstudio/rstudioapi
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
rstudio/rstudioapi#313 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
rstudio/rstudioapi#321 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
rstudio/rstudioapi#318 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
rstudio/rstudioapi#315 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
rstudio/rstudioapi#314 ·
All issues in rstudio/rstudioapi
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
r-lib/pkgdepends#485 · 3 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
beginners blocker
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enviPathR OpenBuild Error Build OK Build Warning policies-accepted pre-review precheck-passed
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Bioconductor/BiocContributions#207 · 6 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
datacarpentry/semester-biology#1255 ·