Documentation

Lean.Linter.PersistentLintLog

Instances For

    A code quality entry recorded into codeQualityLogExt, together with the option name of the linter that produced it. Entries logged via logCodeQualityEntryIf carry their linter's option name, which consumers use to filter by linter selection (e.g. lake lint --lint-only); entries logged via logCodeQualityEntry carry none and are exempt from such filtering.

    Instances For
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        Records linter warnings and looks up positions of their associated commands from a build into lintLogExt so that consumers (e.g. lake lint) can recover them from the .olean.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          Records the code quality entry e into codeQualityLogExt so that it is persisted into the .olean and can be recovered by consumers via getAllCodeQualityEntries.

          This can be safely used in Linters. While regular Lean.Linters, module linters, and stateful linters all have their environment changes discarded after running, entries they log are captured per command (see Command.State.codeQualityEntryTasks) and merged into the final environment in runFrontend.

          The entry is recorded without a linter attribution, so it is recorded unconditionally and no linter selection flag (e.g. lake lint --lint-only) can suppress it. Inside a linter guarded by an option, use logCodeQualityEntryIf instead; this variant is meant for unconditional metrics not tied to any linter option.

          Equations
          Instances For

            Similar to logLintIf, but for logCodeQualityEntry - i.e. it logs an entry only if the provided linter option is enabled, taking linter.all and linter sets into account. The entry is recorded with linterOption.name as its attribution, so consumers can filter it by linter selection (e.g. lake lint --lint-only).

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For