Repository navigation
[Query] Linter
Generated from 'wiki-query.ts' on 2026-11-13, 12:11:51 UTC (v2.17.6), do not edit directly.
Linter Query [overview]
Lints a given R script for common issues.
This query is requested with the type linter.
Run in the REPL: :query @linter [rules:<r1>,<r2>,...] [tags:<t1>,...] [format:<fmt>] <code | file://path>
This query lints a given R script for common issues, such as missing files, unused variables, and more.
For a script reading read.csv("i_do_not_exist.csv"), the following query returns all smells detected:
[ { "type": "linter" } ](This can be shortened to @linter when used with the REPL command :query).
Results (prettified and summarized):
Query: linter (30 ms)
╰ File Path Validity (file-path-validity):
╰ certain:
╰ Path i_do_not_exist.csv at 1.1-30
╰ +22 rules with no findings (:query* to see all)
Show Detailed Results as Json
The analysis ran (including parsing and normalization and the query) within the generation environment.
The JSON contains the ids of the nodes in question (see the Interface wiki page).
{"linter":{"results":{"deprecated-functions":{"results":[],".meta":{"builtin":0,"sigdb":0}},"file-path-validity":{"results":[{"involvedId":3,"loc":[1,1,1,30],"filePath":"i_do_not_exist.csv","certainty":"certain"}],".meta":{"totalReads":1,"totalUnknown":0,"totalWritesBeforeAlways":0,"totalValid":0}},"seeded-randomness":{"results":[],".meta":{"consumerCalls":0,"callsWithFunctionProducers":0,"callsWithAssignmentProducers":0,"callsWithNonConstantProducers":0,"callsWithOtherBranchProducers":0}},"absolute-file-paths":{"results":[],".meta":{"totalConsidered":1,"totalUnknown":0}},"unused-definitions":{"results":[],".meta":{"totalConsidered":0}},"network-functions":{"results":[],".meta":{"totalCalls":0,"totalFunctionDefinitions":0}},"dataframe-access-validation":{"results":[],".meta":{"numOperations":0,"numAccesses":0,"totalAccessed":0}},"dead-code":{"results":[],".meta":{}},"useless-loop":{"results":[],".meta":{"numOfUselessLoops":0}},"problematic-inputs":{"results":[],".meta":{}},"stop-call":{"results":[],".meta":{"consideredNodes":0}},"roxygen-arguments":{"results":[],".meta":{}},"no-leaked-credentials":{"results":[],".meta":{"totalChecked":1}},"undefined-symbol":{"results":[],".meta":{"totalFunctionCalls":1,"totalVariableUses":0,"suppressed":{"installed":0,"loadedPackage":0,"enclosingScope":0,"nonStandardEval":0,"subscript":0,"unresolvedLibrary":0,"declaredGlobal":0}}},"unused-import":{"results":[],".meta":{"totalConsidered":0,"totalUnresolved":0,"totalMultiPackage":0,"totalUnused":0}},"unclosed-connection":{"results":[],".meta":{"totalOpened":0,"totalClosed":0}},"overwritten-file":{"results":[],".meta":{"totalFiles":0}},"unescaped-arguments":{"results":[],".meta":{"totalCriticalArguments":0,"totalEscapedArguments":0}},"namespace-access":{"results":[],".meta":{"unresolved":0}},"secret-exfiltration":{"results":[],".meta":{"secretSinkCalls":0}},"process-state-in-session":{"results":[],".meta":{"sessionFunctions":0}},"call-contracts":{"results":[],".meta":{"checkedCalls":0}},"interactive-functions":{"results":[],".meta":{"totalCalls":0,"totalFunctionDefinitions":0}}},".meta":{}},".meta":{}}You can also configure which rules to apply and what settings to use for these rules:
[ { "type": "linter", "rules": [ "file-path-validity" ] } ](This can be shortened to @linter rules:file-path-validity "read.csv("i_do_not_exist.csv")" when used with the REPL command :query).
Results (prettified and summarized):
Query: linter (7 ms)
╰ File Path Validity (file-path-validity):
╰ certain:
╰ Path i_do_not_exist.csv at 1.1-30
Show Detailed Results as Json
The analysis ran (including parsing and normalization and the query) within the generation environment.
The JSON contains the ids of the nodes in question (see the Interface wiki page).
{"linter":{"results":{"file-path-validity":{"results":[{"involvedId":3,"loc":[1,1,1,30],"filePath":"i_do_not_exist.csv","certainty":"certain"}],".meta":{"totalReads":1,"totalUnknown":0,"totalWritesBeforeAlways":0,"totalValid":0}}},".meta":{}},".meta":{}}We welcome any feedback and suggestions for new rules on this (consider opening a new issue).
Implementation Details
The Linter Query is executed by executeLinterQuery.
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