Repository navigation
[Linting Rule] Undefined Symbol
Generated from 'wiki-linter.ts' on 2026-10-27, 10:46:55 UTC (v2.16.6), do not edit directly.
Undefined Symbol [overview]
This rule ports the following steps of R CMD check (see the conformance table for the legend):
| # | Step | Coverage | Note |
|---|---|---|---|
| 37 | R code for possible problems (book) | 🟩⭐ | ⭐ also quick fixes, deprecated arguments, environments resolved through variables, hooks followed into callees |
This rule is a over-approximative rule.
Finds functions and variables that are neither defined locally, a base R builtin, nor exported by a loaded package.
This linting rule is implemented in src/linter/rules/undefined-symbol.ts.
Linting rules can be configured by passing a configuration object to the linter query as shown in the example below.
The undefined-symbol rule accepts the following configuration options:
-
checkFunctions
flag names used in a function-call position that cannot be resolved (defaulttrue)
R CMD check #37 -
checkSubscripts
flag unresolved symbols used as[/[[subscripts (defaultfalse). Off by default to mutedata.table'sDT[i, j, by]column masking, which flowR cannot distinguish from ordinary indexing.
R CMD check #37 -
checkVariables
flag names used as a variable read that cannot be resolved (defaulttrue). Formulas and data-masking (dplyr/tidyr/ggplot,subset/with) are recognised via flowR's dataflow, so this is precise; residual false positives are possible in dynamiceval/attach.
R CMD check #37
undefined_helper(42)The linting query can be used to run this rule on the above example:
[ { "type": "linter", "rules": [ { "name": "undefined-symbol", "config": {} } ] } ]Results (prettified and summarized):
Query: linter (10 ms)
╰ Undefined Symbol (undefined-symbol):
╰ uncertain:
╰ Undefined function undefined_helper at 1.1-20
More examples are the test cases in test/functionality/linter/lint-undefined-symbol.test.ts.
Currently maintained by Florian Sihler and Oliver Gerstl at Ulm University
Email | GitHub | Penguins | Portfolio
- 🧑💻 Developer Onboarding
- 💻 Setup
- 👓 Overview
- 🪟 Interfacing with flowR
- 🌋 Core
- 🧹 Testing & Linting (Benchmark Page)
⁉️ FAQ- ℹ️ Extra Information