microsoft / microsoft/TypeScript

SARIF output for tsc failures

オープン
#55,890 コメント 5 件 リアクション 6 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Awaiting More Feedback Suggestion
主要言語
Go
スター
111k
フォーク
14.4k
平均マージ
1日 19時間
マージ済み PR(30日)
117

説明

🔍 Search Terms

sarif

✅ Viability Checklist
  • This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • This wouldn't change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
  • This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals
⭐ Suggestion

Today the @typescript-eslint/eslint-plugin plugin will not output errors that happen during compile time. This is by design.

So in my CI (Github Actions) I use eslint but I also need to run a tsc --noEmit in order to check compile-time errors.

Ok so far. The pipeline will fail and PR merge will be prevented.

Let's make the developer experience better. Today, in case of a failure in tsc --noEmit, the developer will need to read the step logs to see the failures of the command.

ESlint already supports the @microsoft/eslint-formatter-sarif to output SARIF format outputs in case of failures and github can take those failures and beautifully display them in the PR for the developer. Link to the Github feature. I already use that for eslint and the typescript plugin.

My feature request is for tsc CLI to have same functionality and output SARIF format files in the output if requested. This can be a flag or implement an interface where output formatters can be implemented separately like ESlint.

📃 Motivating Example

This feature improves the developer experience around the git workflow in Github and in any other version control system.

💻 Use Cases

Showed in the suggestion

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

Issueで説明されている tsc --noEmit コマンドのパスと既存の @microsoft/eslint-formatter-sarif ワークフローから始めます。意図する範囲が組み込みフラグなのか formatter インターフェースなのかを明確にし、完了条件を、GitHubがコンパイル時エラーについて表示できるSARIF出力として定義します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
github-actions, typescript
領域
ci-cd, cli, developer-experience
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。