Skip to content

--format github drops tsconfig-error diagnostic message/help text #22000

@camc314

Description

@camc314

What happened?

When oxlint reports a typescript(tsconfig-error) diagnostic, the default formatter prints the useful diagnostic text, but --format github emits an annotation with an empty message body.

This means CI logs only show the annotation title and do not include the actual tsconfig error, making the failure hard to diagnose from GitHub Actions logs.

Reproduction

Using oxlint 1.62.0.

tsconfig.json:

{
  "compilerOptions": {
    "types": ["bun"]
  },
  "include": ["src"]
}

Run:

oxlint

Output:

  x typescript(tsconfig-error): Invalid tsconfig
  help: Cannot find type definition file for 'bun'.

Then run:

oxlint --format github

Output:

::warning file=,line=0,endLine=0,col=0,endColumn=0,title=typescript(tsconfig-error)::

Expected behavior

The GitHub formatter should include the diagnostic message and help text in the annotation body, for example something equivalent to:

::error title=typescript(tsconfig-error)::Invalid tsconfig%0ACannot find type definition file for 'bun'.

It may also be worth emitting this as an error annotation rather than warning, since the diagnostic has "severity": "error" in JSON output and exits non-zero.

Additional context

JSON formatter includes the data needed by the GitHub formatter:

{
  "message": "Invalid tsconfig",
  "code": "typescript(tsconfig-error)",
  "severity": "error",
  "help": "Cannot find type definition file for 'bun'.",
  "filename": "",
  "labels": []
}

Metadata

Metadata

Assignees

Labels

Type

No type

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions