TAG003: unknown-tag-path
Tag path to a tag that does not exist
| Code | TAG003 |
| Name | unknown-tag-path |
| Category | Tags and gateway (TAG) |
| Default severity | error |
| Enabled by default | no |
| Fix available | no |
| ign-lint equivalent | none |
What it does
Section titled “What it does”Checks static, absolute tag paths ([provider]path) against the tags of
the workspace's gateway configuration: direct tag bindings, {[provider]...}
references and literal tag("...") calls in expressions (bindings and
tag expressions), the paths of tag change scripts, and literal paths passed
to system.tag.readBlocking, readAsync, writeBlocking, writeAsync,
queryTagHistory and the legacy read/write functions in scripts
(through aliases and local names holding a literal; system.tag.exists,
browse and configure are not checked, since they are how scripts test
for and create tags). UDT instance
members are resolved through their definitions, tag properties
(.Quality) are ignored, and paths are compared case-insensitively.
Only providers whose tags are in the workspace are checked: paths to
other providers, remote and managed providers (MQTT Engine, remote tag
providers), relative paths ([.], [~]) and paths with placeholders stay
silent.
Why is this bad?
Section titled “Why is this bad?”A binding or script to a missing tag gets bad quality (Bad_NotFound):
the component shows nothing, the expression evaluates to null, the tag
change script never fires.
Why is this rule not in the default set?
Section titled “Why is this rule not in the default set?”Tags are not only configured in the repository. Scripts create tags at
run time (system.tag.configure), and a workspace with several gateways
can have tag providers of the same name whose configurations differ; the
workspace does not say which gateway a project runs on. A missing tag is
therefore only certain when the repository holds the complete
configuration of the gateway the project runs on. Enable it for such
repositories.
Example
Section titled “Example”{"type": "tag", "config": {"mode": "direct", "tagPath": "[default]Line1/Sped"}}Use instead:
{"type": "tag", "config": {"mode": "direct", "tagPath": "[default]Line1/Speed"}}Generated from the rule metadata by iglint generate-docs; iglint rule TAG003 prints the same page in the terminal. Source: docs/rules/TAG003.md.