NXDL has a way to record optional dimensions:
<dimensions rank="dataRank">
<dim index="1" value="nP" />
<dim index="2" value="i" />
<dim index="3" value="j" />
<dim index="4" value="k" required="false"/>
</dimensions>
nxcheck currently doesn't know about this, so if the optional dimension isn't present, it records a warning like
The field rank is 3, but the dimension index of "k" = 4
I think the fix for this is a bit trickier than #247, because the required field is not currently preserved by xml_to_dict(). But I might try to tackle it next week.