Title: | Style Your Code Fast |
---|---|
Description: | Style your code FAST. |
Authors: | Konrad Pagacz [aut, cre], The authors of the dependency Rust crates [ctb] (see inst/AUTHORS file for details) |
Maintainer: | Konrad Pagacz <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.4.9001 |
Built: | 2024-11-11 05:17:10 UTC |
Source: | https://github.com/kpagacz/tergo |
This configuration is used by the styling functions if no value is provided for the configuration keys.
get_default_config()
get_default_config()
list
with the default configuration
get_default_config()
get_default_config()
Style a package
style(config_file = "tergo.toml", configuration = list(), ...)
style(config_file = "tergo.toml", configuration = list(), ...)
config_file |
( |
configuration |
( |
... |
additional parameters to |
Configuration is read from a file named tergo.toml
in the root of the
package. The precedence of the configuration is (from the highest to lowest):
The configuration passed to the function.
The configuration file.
style() style(config_file = "tergo.toml", configuration = list())
style() style(config_file = "tergo.toml", configuration = list())
Style a file
style_file(file, configuration = list())
style_file(file, configuration = list())
file |
( |
configuration |
( |
Style a package
style_pkg( path = ".", config_file = "tergo.toml", configuration = list(), force = FALSE, extensions = c(".R", ".r") )
style_pkg( path = ".", config_file = "tergo.toml", configuration = list(), force = FALSE, extensions = c(".R", ".r") )
path |
( |
config_file |
( |
configuration |
( |
force |
( |
extensions |
( |
Style text
style_text(text, configuration = list())
style_text(text, configuration = list())
text |
( |
configuration |
( |
This function is vectorized.
(character
) the text formatted as R code
code <- "function(){}" style_text(code) code <- c("function(){}", "A<-7") style_text(code)
code <- "function(){}" style_text(code) code <- c("function(){}", "A<-7") style_text(code)