iOfficeAI/OfficeCLI · error · CliException

lint_fixture_missing

lint_fixture_missing

Error message

No lint fixture available for plugin '{resolved.Manifest.Name}' ({srcExt}). Pass --fixture <path>, or set OFFICECLI_LINT_FIXTURE.

What it means

Lint needs a fixture file (a small foreign-format file the plugin can dump) to exercise the plugin. It resolves --fixture arg, then the OFFICECLI_LINT_FIXTURE env var. This fires when neither is set or the resolved path does not exist. There is no bundled fallback — fixtures are per-plugin.

Source

Thrown at src/officecli/CommandBuilder.Plugins.cs:259

            // "the plugin's emitted batch must use prop keys the schema
            // recognises". Exporters and format-handlers have their own
            // contracts (binary output, vocabulary block) that don't go
            // through the schema validator.
            if (!resolved.Manifest.Kinds.Contains("dump-reader"))
                throw new CliException(
                    $"Plugin '{resolved.Manifest.Name}' is not a dump-reader; lint only applies to dump-reader plugins.")
                {
                    Code = "unsupported_plugin_kind",
                    Suggestion = "Run `officecli plugins info <name>` to see what kinds the plugin advertises.",
                };

            // Resolve a fixture: explicit arg → env var. No bundled fallback —
            // a fixture is a per-plugin concern; the plugin author (or CI)
            // pins it via --fixture or $OFFICECLI_LINT_FIXTURE.
            var srcExt = resolved.Manifest.Extensions.FirstOrDefault() ?? "";
            fixturePath ??= Environment.GetEnvironmentVariable("OFFICECLI_LINT_FIXTURE");
            if (string.IsNullOrEmpty(fixturePath) || !File.Exists(fixturePath))
                throw new CliException(
                    $"No lint fixture available for plugin '{resolved.Manifest.Name}'" +
                    (string.IsNullOrEmpty(srcExt) ? "" : $" ({srcExt})") + ". " +
                    "Pass --fixture <path>, or set OFFICECLI_LINT_FIXTURE.")
                {
                    Code = "lint_fixture_missing",
                    Suggestion = "Provide a small foreign-format file the plugin can dump.",
                };

            // The plugin's declared target format determines which schema
            // tree to validate emitted props against (default: docx).
            var schemaFormat = resolved.Manifest.ResolveTargetFormat();

            // Run the plugin and stream JSONL.
            var items = new List<BatchItem>();
            var findings = new List<LintFinding>();

            void OnLine(string raw)
            {

View on GitHub (pinned to 1ced45e900)

Solutions

  1. Pass --fixture <path> to a small foreign-format sample.
  2. Or export OFFICECLI_LINT_FIXTURE=<path> in your shell/CI.
  3. Use an absolute fixture path.

Example fix

# before
officecli plugins lint my-reader
# after
officecli plugins lint my-reader --fixture samples/tiny.foreign
# or
export OFFICECLI_LINT_FIXTURE=/abs/samples/tiny.foreign
officecli plugins lint my-reader
Defensive patterns

Strategy: validation

Validate before calling

var fixture = fixtureArg ?? Environment.GetEnvironmentVariable("OFFICECLI_LINT_FIXTURE");
if (string.IsNullOrEmpty(fixture) || !File.Exists(fixture))
    throw new FileNotFoundException(
        "No lint fixture; pass --fixture <path> or set OFFICECLI_LINT_FIXTURE.");

Prevention

When it happens

Trigger: 'officecli plugins lint <dump-reader>' with no --fixture and OFFICECLI_LINT_FIXTURE unset, empty, or pointing at a missing file.

Common situations: CI forgot to set OFFICECLI_LINT_FIXTURE; local dev without a fixture; fixture path relative to the wrong working directory.

Related errors


AI-assisted analysis of iOfficeAI/OfficeCLI@1ced45e900 (2026-08-13). Data as JSON: /api/errors/205b25215249cd16. Report an issue: GitHub.