Skip to content

[Linting Rule] Autoload Files

github-actions[bot] edited this page Nov 27, 2026 · 1 revision

Generated from 'wiki-linter.ts' on 2026-11-21, 15:29:25 UTC (v2.17.9), do not edit directly.

Autoload Files [overview]

smell security

This rule is a over-approximative rule.

Finds code in a project that will be executed automatically through autoload files like .RProfile
This linting rule is implemented in src/linter/rules/autoload-files.ts.

Configuration

Linting rules can be configured by passing a configuration object to the linter query as shown in the example below. The autoload-files rule accepts the following configuration options:

Examples

A project with the code R/code.R:

f <- function() 1

and the files

.RProfile:

system("rm -rf /")

The linting query can be used to run this rule on the above example:

[ { "type": "linter",   "rules": [ { "name": "autoload-files",     "config": {} } ] } ]

Results (prettified and summarized):

Query: linter (12 ms)
   ╰ Autoload Files (autoload-files):
       ╰ certain:
           ╰ File /pkg/.RProfile

More examples are the test cases in test/functionality/linter/lint-autoload-files.test.ts.

Clone this wiki locally