Extracts the numeric part of a rule ID (the digits after the severity-prefix
letter), used to order diagnostics by rule number within a severity. A rule ID
that does not follow the [FEWID]\d+ convention (e.g. a custom rule) yields
u32::MAX so it sorts after the well-formed built-in rules.
Derive the top-level CloudFormation template section a rule reports on.
Used to fall back to the section’s span when a diagnostic has no more
precise location.