lintr for rmarkdown inline code?

I write a lot of inline code in my rmarkdown documents so that any markdown text with numbers (e.g., statistical model results, summary data) is reproducible and updates automatically with any changes to the input data.

Are there any lintr functions to detect if the inline code either errors or returns NULL? Right now, if the inline code errors/returns NULL, there's no indication and the inline code just leaves a blank in the report - so its easy to miss if some inline code doesn't work or stops working.


I’ve not used {lintr} but it looks like overkill unless there are specific errors expected that standard linters can be applied or custom linters written.

Instead, I’d wrap a chunk in try.