Repository navigation
[Linting Rule] Unclosed Connection
Generated from 'wiki-linter.ts' on 2026-11-08, 14:25:27 UTC (v2.17.4), do not edit directly.
Unclosed Connection [overview]
This rule is a best-effort rule.
Finds connections that are opened but not closed on every path opening them.
This linting rule is implemented in src/linter/rules/unclosed-connection.ts.
Linting rules can be configured by passing a configuration object to the linter query as shown in the example below.
The unclosed-connection rule accepts the following configuration options:
-
closeFns
functions closing the connection they are handed, besides the ones flowR statesSemanticCallTag.Closesfor -
openFns
functions opening a connection, besides the ones flowR statesSemanticCallTag.Opensfor
con <- file("data.csv")
readLines(con)The linting query can be used to run this rule on the above example:
[ { "type": "linter", "rules": [ { "name": "unclosed-connection", "config": {} } ] } ]Results (prettified and summarized):
Query: linter (41 ms)
╰ Unclosed Connection (unclosed-connection):
╰ certain:
╰ Unclosed connection at 1.8-23 (1 quick fix(es) available)
More examples are the test cases in test/functionality/linter/lint-unclosed-connection.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