Skip to content

Commit 10517e4

Browse files
committed
Ignoring jarl warnings for internal functions in docs
1 parent b4608da commit 10517e4

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

RcppTskit/vignettes/RcppTskit_intro.qmd

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,23 +270,29 @@ ts2 <- tc$tree_sequence()
270270
help(package = "RcppTskit")
271271
```
272272

273-
Developers should also explore the low-level `R` and `C++` functions.
273+
Developers should also explore the internal `R` and `C++` functions.
274274
Their names all start with `rtsk_` and are accessible via `RcppTskit:::`.
275+
Since these are internal functions we instruct the linter `jarl`
276+
not to warn about their use.
275277
For example, the above `R` function `ts_load()` effectively calls:
276278

277279
```{r}
278280
#| label: use_case_1_dev_funcs
279281
# Low-level R function, which further calls the C++ function
282+
# jarl-ignore internal_function: exposing for demo/doc
280283
RcppTskit:::rtsk_treeseq_load
281284
282285
# C++ function (see also the C++ source code)
286+
# jarl-ignore internal_function: exposing for demo/doc
283287
RcppTskit:::`_RcppTskit_rtsk_treeseq_load`
284288
285289
# The same as the ts_load() example, but exposing the external pointer
290+
# jarl-ignore internal_function: exposing for demo/doc
286291
xptr <- RcppTskit:::rtsk_treeseq_load(ts_file)
287292
methods::is(xptr)
288293
289294
# We pass the external pointer to other low-level functions
295+
# jarl-ignore internal_function: exposing for demo/doc
290296
RcppTskit:::rtsk_treeseq_get_num_individuals(xptr)
291297
```
292298

0 commit comments

Comments
 (0)