Documentation

Lean.Elab.GuardMsgs

#guard_msgs and #guard_panic commands for testing commands

This module defines commands to test that other commands produce expected messages:

See the docstrings on the individual commands.

The decision made by a specification for a message.

  • check : FilterSpec

    Capture the message and check it matches the docstring.

  • drop : FilterSpec

    Drop the message and delete it.

  • pass : FilterSpec

    Do not capture the message.

Instances For

    The method to use when normalizing whitespace, after trimming.

    Instances For

      Method to use when combining multiple messages.

      Instances For

        The specification options for #guard_msgs. The default field values provide the default behavior of #guard_msgs.

        Instances For

          Parses a GuardMsgsSpec.

          • No specification: check everything.
          • With a specification: interpret the spec, and if nothing applies pass it through.
          Instances For

            An info tree node corresponding to a failed #guard_msgs invocation, used for code action support.

            • res : String

              The result of the nested command

            Instances For

              Makes trailing whitespace visible and protects them against trimming by the editor, by appending the symbol ⏎ to such a line (and also to any line that ends with such a symbol, to avoid ambiguities in the case the message already had that symbol).

              Instances For

                Applies a whitespace normalization mode.

                Instances For

                  Applies a message ordering mode.

                  Instances For

                    Runs a command and collects all messages (sync and async) it produces. Clears the snapshot tasks after collection. Returns the collected messages.

                    Instances For

                      A code action which will update the doc comment on a #guard_msgs invocation.

                      Instances For