Skip to content

[Linting Rule] Namespace Access

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

Generated from 'wiki-linter.ts' on 2026-10-27, 10:46:55 UTC (v2.16.6), do not edit directly.

Namespace Access Validity [overview]

bug quickfix

This rule ports the following steps of R CMD check (see the conformance table for the legend):

# Step Coverage Note
28 dependencies in R code (book) 🟩⭐ ⭐ also resolves package names through variables and knows the loaders of other packages

This rule is a best-effort rule.

Finds pkg:::name where name is actually exported by pkg (so :: would do), and pkg::name where the signature database knows name is not exported (which fails at runtime in R). Stays silent whenever the database has no definite answer for the name.
This linting rule is implemented in src/linter/rules/namespace-access.ts.

Examples

dplyr:::filter(df, x > 1)

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

[ { "type": "linter",   "rules": [ { "name": "namespace-access",     "config": {} } ] } ]

Results (prettified and summarized):

Query: linter (2 ms)
   ╰ Namespace Access Validity (namespace-access):
       ╰ certain:
           ╰ dplyr:::filter at 1.1-25 (1 quick fix(es) available)

More examples are the test cases in test/functionality/linter/lint-namespace-access.test.ts.

Clone this wiki locally

⌂ 换网址