Repository navigation
Conversation
Reviewing a real 2.4 MB project, validate/check produced ~15k UUID warnings and ~500 wiring/layout findings that were almost all noise. validate: - Drop the "UUID missing serial suffix" rule. The last UUID group identifies the Loxone Config installation that created the element, not the Miniserver serial; projects mix many suffixes. Replace it with a shape check (8-4-4-16 hex, short last group allowed for system/mode UUIDs). - Ignore Config-managed links (<In FLG="1">) and API connectors (API, OutputAPI: they take command text in) in the wiring-direction check. check: - Only report missing canvas layout for direct Page children, and skip hidden InputRef/OutputRef whose WF lacks the 0x20000 placed bit; nested elements (Keycode in NfcCodeTouch, meters in EFM) never have coordinates. - Stop reporting individually unwired inputs: most inputs are optional and the schemas carry no required-input data. - Only report "no inputs wired" for pure logic blocks; controllers are legitimately driven from the app, by time or by device binding. - Skip wiring checks for blocks not on a Page, for InputRef/OutputRef (fed by Ref) and for AutoPilot/AutopilotRule (conditions live in APC, inputs are Config-managed). - A parameter such as comparator Input2 counts as set when it has a Def or at least one <In> wire. - An empty GreaterEqual/Less threshold compares against 0, which can be intended (e.g. a price below 0), so report it as a warning, not an error.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On a real 2.4 MB house project,
lox config validateandlox config checkproduced about 15,000 UUID warnings and about 750 wiring and layout findings. Almost all of it was noise, and it hid the few real problems. On the 41 sample configs intests/eval/golden/configs,checkfailed on 40 of them for the same reasons. This PR removes those false positives and keeps the genuine cases.Changes
validate
<In FLG="1">) and API connectors (API,OutputAPI). An API connector takes command text in, e.g. from a virtual text input, and reports status out.check
InputRef/OutputRef/OutputRefLMwithout the 0x20000 "placed" bit are skipped. Nested elements (Keycodes in an NfcCodeTouch, meters in an EFM) never have coordinates. A normal block on a page without coordinates is still reported.Ref, not by page wires) and AutoPilot / AutopilotRule (their conditions live in theAPCJSON; their inputs are managed by Config).Input2: counts as set when it has aDefor at least one<In>wire. An emptyGreaterEqual/Lessthreshold compares against 0, which can be intended (e.g. Loxone's own SG Ready sample tests "price below 0"), so it is now a warning instead of an error.Results
Real project:
41 sample configs:
Var1/Var2, left as is)checkexits 0Testing
New unit tests, one per rule. Each covers the false-positive case and confirms the genuine case is still reported:
The tests for the original six fixes fail on
main.cargo fmt --check,cargo clippy -- -D warnings,cargo build --releaseandcargo testpass.Known gap
A controller with nothing wired at all (e.g. a forgotten LightController2) is no longer reported. A narrower warning for that case was tried, but nearly all of its hits on real data were legitimate, so it was left out.