REF013: unused-named-query
Named query is not referenced anywhere
| Code | REF013 |
| Name | unused-named-query |
| Category | References (REF) |
| Default severity | info |
| Enabled by default | no |
| Fix available | no |
| ign-lint equivalent | none |
What it does
Section titled “What it does”Reports named queries that no query binding in the project (or in a
project inheriting from it) uses, and no script call
(system.db.runNamedQuery, execQuery, ...) with a literal path.
Why is this bad?
Section titled “Why is this bad?”Unused queries are dead code that still has to be kept in sync with the database schema.
Paths built at run time count by their literal prefix ('Reports/' + name uses every query under Reports/). Queries of inheritable projects,
and of projects with resources whose scripts are not analysed (reports,
alarm pipelines, SFC charts, Vision windows), are not reported.
This rule is not in the default set: named queries are also run from other projects through the gateway.
Example
Section titled “Example”A named query Reports/Legacy that no binding or script uses. Delete it,
or use it where it is meant to be used.
Generated from the rule metadata by iglint generate-docs; iglint rule REF013 prints the same page in the terminal. Source: docs/rules/REF013.md.