New lint check: Check idArity invariants (#10181)