Repository navigation
[Linting Rule] File Path Validity
Generated from 'wiki-linter.ts' on 2026-11-08, 14:25:27 UTC (v2.17.4), do not edit directly.
File Path Validity [overview]
This rule is a best-effort rule.
Finds file paths used in read and write operations that are invalid or do not point to existing files.
This linting rule is implemented in src/linter/rules/file-path-validity.ts.
Linting rules can be configured by passing a configuration object to the linter query as shown in the example below.
The file-path-validity rule accepts the following configuration options:
-
additionalReadFunctions
The set of functions that should additionally be considered as reading a file path. Entries in this array use theFunctionInfoformat from the dependencies query. -
additionalWriteFunctions
The set of functions that should additionally be considered as writing to a file path. Entries in this array use theFunctionInfoformat from the dependencies query. -
checkUrls
Whether URLs should be validated by checking the endpoint exists. Whenfalse(default), URLs are silently ignored. Whentrue, an HTTP HEAD request is made and the URL is reported if unreachable. -
includeUnknown
Whether unknown file paths should be included as linting results.
A project with the code R/code.R:
survey <- read.csv("data/Survey.csv")and the files
R/survey.csv:
id,value
1,2
The linting query can be used to run this rule on the above example:
[ { "type": "linter", "rules": [ { "name": "file-path-validity", "config": {} } ] } ]Results (prettified and summarized):
Query: linter (10 ms)
╰ File Path Validity (file-path-validity):
╰ certain:
╰ Path data/Survey.csv at /pkg/R/code.R:1.11-37 (1 quick fix(es) available)
More examples are the test cases in test/functionality/linter/lint-file-path-validity.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