Skip to content

Styler crashes #1266

@bernt-matthias

Description

@bernt-matthias

I'm trying to run style_file on a Rmd file

style_file("tools/phi-toolkit/report.Rmd", indent_by = 4)

and get:

Styling  1  files:
 tools/phi-toolkit/report.Rmd ⚠ 
────────────────────────────────────────
Status	Count	Legend 
✔ 	0	File unchanged.
ℹ 	0	File changed.
✖ 	1	Styling threw an error.
────────────────────────────────────────
Warning message:
When processing tools/phi-toolkit/report.Rmd: there is no package called ‘knitr’ 

Wondering if there is a way to know what the error is.

Also wondering about the warning. Yes, the Rmd file uses knitr, but static code analysis should not import anything from the code, or?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions