Repository navigation
[Linting Rule] Foreign Function Calls
Generated from 'wiki-linter.ts' on 2026-10-25, 09:29:25 UTC (v2.16.6), do not edit directly.
Foreign Function Calls [overview]
This rule ports the following steps of R CMD check (see the conformance table for the legend):
| # | Step | Coverage | Note |
|---|---|---|---|
| 40 | foreign function calls (book) | 🔷⭐ | ⭐ also resolves PACKAGE arguments through variables routine registration needs the installed package |
This rule is a best-effort rule.
Finds problems in .Call, .C, .External, and .Fortran calls: a missing or empty PACKAGE, calls into base or other packages, and undeclared packages. Routine and package names are resolved through variables.
This linting rule is implemented in src/linter/rules/cmd-check/foreign-function-calls.ts.
Linting rules can be configured by passing a configuration object to the linter query as shown in the example below.
The foreign-function-calls rule accepts the following configuration options:
-
resolveValues
also resolve the routine andPACKAGEthrough variables, whichR CMD checkcannot see (defaulttrue)
R CMD check #40
f <- function(x) .Call("C_mean", x)The linting query can be used to run this rule on the above example:
[ { "type": "linter", "rules": [ { "name": "foreign-function-calls", "config": {} } ] } ]Results (prettified and summarized):
Query: linter (2 ms)
╰ Foreign Function Calls (foreign-function-calls):
╰ certain:
╰ .Call("C_mean"): missing-package at 1.18-35
More examples are the test cases in test/functionality/linter/cmd-check/lint-foreign-function-calls.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