quarto-dev / quarto-dev/quarto-cli

When quarto edits `.gitignore` in an R package, it should probably also check/modify `.Rbuildignore`

Open
#9,745 5 comments 0 reactions 1 assignee View on GitHub

@cscheid is already working on this.

Since May 22, 2024.

enhancement
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Bug description

I've been playing with the use of quarto and the quarto extension to preview .[R]?md files in an R package. The most typical targets are:

  • NEWS.md
  • README.Rmd or README.md
  • vignettes/whatever.Rmd

quarto preview adds /.quarto/ to the local .gitignore, i.e. to the top-level .gitignore in the first 2 cases above and to vignettes/.gitignore in the last case. Related issue: #9744.

I think quarto also needs to add an entry to .Rbuildignore in this scenario, if a relevant entry isn't already there. If you don't, R CMD check shows:

N  checking for hidden files and directories ...
   Found the following hidden files and directories:
     .quarto
     vignettes/.quarto
   These were most likely included in error. See section ‘Package
   structure’ in the ‘Writing R Extensions’ manual.

Here's the entry you'd want to add to .Rbuildignore if it's not already present:

^\.quarto$

(I can also add something to usethis, so that this is pre-populated if usethis does the project setup, going forward, but that's more of a gesture of moral support than an actual fix.)

Steps to reproduce

No response

Expected behavior

No response

Actual behavior

No response

Your environment

No response

Quarto check output

No response

Contributor guide

Open the contributing guide

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.