Skip to content

PQA022 — Range requires uint address

An entity declares a range but its address is not uint.

range bounds the slots the framework allocator may hand out. Allocation happens only for uint addresses — that is the addressing mode where the framework, not the data, decides the number.

- entity: Card
  address: string
  range: [1, 250]         # nothing allocates here

Why the build refuses this

A range on a non-allocated address governs nothing. It reads like a capacity limit and enforces none, so the model states a constraint the runtime never applies.

It usually marks a wrong addressing choice. A range was written because the panel's table has bounded capacity — which is exactly the case for address: uint. The mismatch is the signal.

How to fix it

If the framework allocates the slot, say uint.

address: uint
range: [1, 250]

If the value comes from the data, drop the range. A natural key has no allocation to bound; use id: naming the property that carries it.

If you disagree with a report

Do not suppress it. A wrong report is a bug in the check — report it with the YAML that triggered it.