vigiles API reference
    Preparing search index...

    Function mustInclude

    • Every matched command must contain fragment.

      why is REQUIRED, and it is the point: the failure message has to carry the consequence, because a bare "missing -g" tells the reader to add a flag without telling them what breaks — and a rule whose reason is lost is the next thing someone deletes as noise. It is usually one clause from the prose the check is enforcing, which keeps the two in the same file and in sync.

      🔴 AN EMPTY COMMAND SET PASSES VACUOUSLY, AND THAT IS REPORTED. If the filter matched nothing, the rule held over zero commands — which is true and worthless, and reads identically to a rule that held over twenty. So the check FAILS on an empty set: at that point either the extraction broke or the document stopped shipping the commands the rule is about, and both are things the author wants to hear.

      Parameters

      • fragment: string
      • why: string

      Returns Check<readonly DocCommand[]>