Type object
File match jarl.toml
Schema URL https://catalog.lintel.tools/schemas/schemastore/jarl/latest.json
Source https://github.com/etiennebacher/jarl/releases/latest/download/jarl.schema.json

Validate with Lintel

npx @lintel/lintel check
Type: object

Properties

lint LinterTomlOptions | null

Definitions

AssignmentConfig object | object

Accepts either the legacy top-level string (assignment = "<-") or the new table form ([lint.assignment] with an operator field).

TOML doesn't allow a key to be both a string and a table, but by trying the table form first we can surface clear errors (like "unknown field") while still falling back to the legacy string form.

AssignmentOptions object

TOML options for [lint.assignment].

Use operator to specify which assignment operator to enforce. Valid values are "<-" (the default) and "=".

operator string | null
DuplicatedArgumentsOptions object

TOML options for [lint.duplicated_arguments].

Use skipped-functions to fully replace the default list of functions that are allowed to have duplicated arguments. Use extend-skipped-functions to add to the default list. Specifying both is an error.

extend-skipped-functions array | null
skipped-functions array | null
ImplicitAssignmentOptions object

TOML options for [lint.implicit_assignment].

Use skipped-functions to fully replace the default list of functions where implicit assignments are allowed. Use extend-skipped-functions to add to the default list. Specifying both is an error.

extend-skipped-functions array | null
skipped-functions array | null
LinterTomlOptions object
assignment AssignmentConfig | null

Accepts either the legacy form assignment = "<-" (deprecated) or the new table form [lint.assignment] with an operator field.

check-roxygen boolean | null

When enabled, Jarl parses and checks R code found in roxygen2 @examples and @examplesIf documentation sections. Only applies to files inside an R package (i.e. in the R/ directory with a DESCRIPTION file in the parent).

Defaults to true.

default-exclude boolean | null

Jarl automatically excludes a default set of folders and files. If this option is set to false, these files will be formatted as well.

The default set of excluded patterns are:

  • .git/
  • renv/
  • revdep/
  • cpp11.R
  • RcppExports.R
  • extendr-wrappers.R
  • import-standalone-*.R
duplicated_arguments DuplicatedArgumentsOptions | null

Use skipped-functions to fully replace the default list of functions that are allowed to have duplicated arguments. Use extend-skipped-functions to add to the default list. Specifying both is an error.

exclude array | null

By default, jarl will refuse to check files matched by patterns listed in default-exclude. Use this option to supply an additional list of exclude patterns.

Exclude patterns are modeled after what you can provide in a .gitignore, and are resolved relative to the parent directory that your jarl.toml is contained within. For example, if your jarl.toml was located at root/jarl.toml, then:

  • file.R excludes a file named file.R located anywhere below root/. This is equivalent to **/file.R.

  • folder/ excludes a directory named folder (and all of its children) located anywhere below root/. You can also just use folder, but this would technically also match a file named folder, so the trailing slash is preferred when targeting directories. This is equivalent to **/folder/.

  • /file.R excludes a file named file.R located at root/file.R.

  • /folder/ excludes a directory named folder (and all of its children) located at root/folder/.

  • file-*.R excludes R files named like file-this.R and file-that.R located anywhere below root/.

  • folder/*.R excludes all R files located at root/folder/. Note that R files in directories under folder/ are not excluded in this case (such as root/folder/subfolder/file.R).

  • folder/**/*.R excludes all R files located anywhere below root/folder/.

  • **/folder/*.R excludes all R files located directly inside a folder/ directory, where the folder/ directory itself can appear anywhere.

See the full .gitignore documentation for all of the patterns you can provide.

extend-select array | null

This is a list of rule names to add on top of the existing selection. This is useful in the case where you want to use the default set of rules and some additional opt-in rules. In this scenario, you only need to add extend-select = ["OPT_IN_RULE"] instead of writing all default rule names.

This has the same constraints as select.

fix-roxygen boolean | null

When enabled, Jarl will attempt to apply fixes to R code inside roxygen2 @examples and @examplesIf sections. Since Air does not currently support formatting roxygen examples, this is opt-in.

Defaults to false.

fixable array | null

A list of rules for which violations will be fixed if possible. By default, all rules are considered fixable. This only matters if you pass --fix in the CLI.

ignore array | null

If this is empty, then no rules are excluded. This field has higher importance than select, so if a rule name appears by mistake in both select and ignore, it is ignored.

implicit_assignment ImplicitAssignmentOptions | null

Use skipped-functions to fully replace the default list of functions that are allowed to contain implicit assignment. Use extend-skipped-functions to add to the default list. Specifying both is an error.

include array | null

By default, jarl checks all files with a .R, .qmd, .Rmd, or .rmd extension discovered in the provided paths. Use this option to restrict checking to files that match at least one of the supplied patterns. An empty list or a missing option means no restriction, i.e. all discovered files are checked.

Include patterns follow the same format as exclude patterns (gitignore style, resolved relative to the jarl.toml directory). For example:

  • R/ only checks files inside the R/ directory.

  • test-*.R only checks files whose name matches test-*.R.

  • **/*.{Rmd,qmd} only checks Rmd and qmd files.

When both include and exclude are specified, a file is checked only if it matches at least one include pattern and does not match any exclude pattern.

select array | null

If this is empty, then all rules that are provided by jarl are used, with one limitation related to the minimum R version used in the project. By default, if this minimum R version is unknown, then all rules that have a version restriction are deactivated. This is for example the case of grepv since the eponymous function was introduced in R 4.5.0.

There are three ways to inform jarl about the minimum version used in the project:

  1. pass the argument --min-r-version in the CLI, e.g., jarl --min-r-version 4.3;
  2. if the project is an R package, then jarl looks for mentions of a minimum R version in the Depends field sometimes present in the DESCRIPTION file.
  3. specify min-r-version in jarl.toml.
undesirable_function UndesirableFunctionOptions | null

Use functions to fully replace the default list of undesirable functions. Use extend-functions to add to the default list. Specifying both is an error.

unfixable array | null

A list of rules that are never fixed. This only matters if you pass --fix in the CLI.

unreachable_code UnreachableCodeOptions | null

Use stopping-functions to fully replace the default list of functions that are considered to stop execution (never return). Use extend-stopping-functions to add to the default list. Specifying both is an error.

unused_function UnusedFunctionOptions | null

Use threshold-ignore to control how many unused_function violations are allowed before they are all hidden (likely false positives).

Use skipped-functions to determine which functions won't be reported even if Jarl considers them unused.

UndesirableFunctionOptions object

TOML options for [lint.undesirable_function].

Use functions to fully replace the default list of undesirable functions. Use extend-functions to add to the default list. Specifying both is an error.

extend-functions array | null
functions array | null
UnreachableCodeOptions object

TOML options for [lint.unreachable_code].

Use stopping-functions to fully replace the default list of functions that are considered to stop execution (never return). Use extend-stopping-functions to add to the default list. Specifying both is an error.

extend-stopping-functions array | null
stopping-functions array | null
UnusedFunctionOptions object

TOML options for [lint.unused_function].

Use threshold-ignore to control when unused_function diagnostics are hidden. When the number of violations exceeds this threshold, they are suppressed with an informative note (likely false positives).

Use skipped-functions to provide a list of regex patterns for functions that should be skipped by this rule.

skipped-functions array | null
threshold-ignore integer | null
format=uintmin=0