CLI options
Jarl comes with various options available directly from the command line. These can be listed with jarl check --help.
Usage: jarl check [OPTIONS] <FILES>...
Arguments
<FILES>...
List of files or directories to check or fix lints, for example jarl check . or jarl check doc1.R doc2.R.
Options
-f, --fix
Automatically fix issues detected by the linter.
-u, --unsafe-fixes
Include fixes that may not retain the original intent of the code.
--fix-only
Apply fixes to resolve lint violations, but don’t report on leftover violations. Implies --fix.
--allow-dirty
Apply fixes even if the Git branch is not clean, meaning that there are uncommitted files.
--allow-no-vcs
Apply fixes even if there is no version control system.
-s, --select <SELECT>
Names of rules to include, separated by a comma (no spaces). Also accepts names of groups of rules, such as "PERF".
-e, --extend-select <EXTEND_SELECT>
Like --select but adds additional rules in addition to those already specified.
-i, --ignore <IGNORE>
Names of rules to exclude, separated by a comma (no spaces). Also accepts names of groups of rules, such as "PERF".
-w, --with-timing
Show the time taken by the function.
-m, --min-r-version <MIN_R_VERSION>
The minimum R version to be used by the linter. Some rules only work starting from a specific version.
--output-format <OUTPUT_FORMAT>
Output serialization format for violations. Possible values:
full(default): Print diagnostics with full context using annotated code snippetsconcise: Print diagnostics in a concise format, one per linegithub: Print diagnostics as GitHub formatjson: Print diagnostics as JSON
--assignment <ASSIGNMENT>
[DEPRECATED: use [lint.assignment] in jarl.toml]
Assignment operator to use, can be either <- or =.
--no-default-exclude
Do not apply the default set of file patterns that should be excluded.
--statistics
Show counts for every rule with at least one violation.
--add-jarl-ignore[=<REASON>]
Automatically insert a # jarl-ignore comment to suppress all violations. The default reason can be customized with --add-jarl-ignore="my_reason".
-h, --help
Print help (see a summary with -h).
Global options
--log-level <LOG_LEVEL>
The log level. One of: error, warn, info, debug, or trace. [default: warn]
Examples
You can pass multiple options at once, for instance:
jarl check . --fix --select any_is_na,class_equals