Repository navigation
[Linting Rule] Overwritten File
Generated from 'wiki-linter.ts' on 2026-10-27, 10:46:55 UTC (v2.16.6), do not edit directly.
Overwritten File [overview]
This rule is a best-effort rule.
Finds files the script writes more than once, so the later write replaces what the earlier one wrote, as two figures saved under the same name.
This linting rule is implemented in src/linter/rules/overwritten-file.ts.
Linting rules can be configured by passing a configuration object to the linter query as shown in the example below.
The overwritten-file rule accepts the following configuration options:
-
additionalWriteFunctions
functions that write a file, besides the ones the dependencies query knows
write.csv(cars, "out.csv")
write.csv(iris, "out.csv")The linting query can be used to run this rule on the above example:
[ { "type": "linter", "rules": [ { "name": "overwritten-file", "config": {} } ] } ]Results (prettified and summarized):
Query: linter (2 ms)
╰ Overwritten File (overwritten-file):
╰ certain:
╰ out.csv is written again, replacing what line 1 wrote to it
More examples are the test cases in test/functionality/linter/lint-overwritten-file.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