style_box_use_file: Style the box::use() calls of a source code

View source: R/style_box_use.R

style_box_use_fileR Documentation

Style the box::use() calls of a source code

Description

Style the box::use() calls of a source code

Usage

style_box_use_file(filename, indent_spaces = 2, trailing_commas_func = FALSE)

Arguments

filename

A file path to style.

indent_spaces

An integer scalar indicating tab width in units of spaces

trailing_commas_func

A boolean to activate adding a trailing comma to the end of the lists of functions to attach.

Details

Refer to style_box_use_text() for styling details.

Examples

code <- "box::use(stringr[str_trim, str_pad], dplyr)"
file <- tempfile("style", fileext = ".R")
writeLines(code, file)

style_box_use_file(file)


box.linters documentation built on Sept. 11, 2024, 8:20 p.m.