Skip to content

[Linting Rule] Software Has Tests

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.

Software Has Tests [overview]

smell reproducibility usability

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

# Step Coverage Note
24 for code which exercises the package (book) 🟩 only tests count, examples and vignettes do not

This rule is a best-effort rule.

Finds software projects without tests (test files in a test directory or test function calls in R code).
This linting rule is implemented in src/linter/rules/software-has-tests.ts.

Configuration

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

Examples

cat("hello")

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

[ { "type": "linter",   "rules": [ { "name": "software-has-tests",     "config": {} } ] } ]

Results (prettified and summarized):

Query: linter (1 ms)
   ╰ Software Has Tests (software-has-tests):
       ╰ certain:
           ╰ No tests found in the project

More examples are the test cases in test/functionality/linter/lint-software-has-tests.test.ts.

Clone this wiki locally

⌂ 换网址