REF011: unused-view
View is not referenced anywhere
| Code | REF011 |
| Name | unused-view |
| 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 views that no literal reference in the project (or in a project
inheriting from it) points at: no embedded view, repeater, table, popup,
navigate or dock action, page or dock in the page configuration, and no
script call (system.perspective.openPopup, togglePopup,
navigate(view=...)) with a literal path.
Why is this bad?
Section titled “Why is this bad?”Unused views are dead weight: they are still loaded, searched and maintained, and they confuse readers about what the application shows.
Paths built at run time are taken into account by their literal prefix:
a bound props.path whose expression is 'Cards/' + {view.params.kind},
or a script call with 'Popups/' + name, makes every view under that
prefix count as used (a path with no literal prefix makes every view
count). Views of inheritable projects are not reported, because projects
outside the workspace may use them.
This rule is not in the default set: paths can also come from tags, databases or session properties, which no static analysis sees.
Example
Section titled “Example”A view Old/MotorPanel that nothing embeds, opens or navigates to. Delete
it, or reference it where it is meant to be used.
Generated from the rule metadata by iglint generate-docs; iglint rule REF011 prints the same page in the terminal. Source: docs/rules/REF011.md.