Unvendor the vignettes/
directory for R packages
#6160
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
In an R package, the
vignettes/
directory holds executable documents that are rendered into documentation at package build time. Currently linguist incorrectly labels this folder as vendored code, which has multiple downstream downsides, including causing exclusion of the files belowvignettes/
from code search. (It seems like linguist might use the "vendored" label pragmatically, but then other projects use this data and take the label at face value?)This was introduced in 9ae0bdb, which was wrong IMO. (Or, at least, has become wrong as other folks started to use linguist's vendored list as if it really means vendored).
The executable documents in
vignettes/
tend to be RMarkdown documents, a file type that that is already (correctly) handled elsewhere in linguist:In
languages.yml
:https://github.com/github/linguist/blob/16a7a528ab840dd24188edda671d31881a67e527/lib/linguist/languages.yml#L5428-L5439
The executable documents we keep in
vignettes/
are compiled to PDF or html files that live ininst/doc/
, which is already handled (by which I mean "excluded"), thanks to #4068:https://github.com/github/linguist/blob/16a7a528ab840dd24188edda671d31881a67e527/lib/linguist/documentation.yml#L19
linguist is correctly ignoring the rendered documentation but is incorrectly labelling the source as vendored code, which it's not.
Checklist:
It's not clear to me that this functionality is tested. Sorry if that's just user error.