microsoft / microsoft/TypeScript
Some colors make error messages hard to read on white backgrounds.
まだ誰も着手していません。
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.3k
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 132
説明
On a terminal with white background, some parts of the error messages are very hard to read:
### Cause
The problem is that the `diagnosticwriter` is forcing the [bright versions of the colors](https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h4-Functions-using-CSI-_-ordered-by-the-final-character-lparen-s-rparen:CSI-Pm-m:Ps-=-9-0.1E5F), instead of using the default colors set by the terminal configuration (by writing `9x` instead of `3x`):
https://github.com/microsoft/typescript-go/blob/168e7015edf98244febc8f4ae450b673b5d195d7/internal/diagnosticwriter/diagnosticwriter.go#L108-L112
If I patch the binary to replace the colors to `3x` with this:
```
$ sed -i 's/\x1b\[9\(.\)m/\x1b[3\1m/g' ./node_modules/@typescript/typescript-linux-x64/lib/tsc
```
Then the output is much easier to read:
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
internal/diagnosticwriter/diagnosticwriter.go の、issue でリンクされている色書き込みコードから始め、そこで出力されるターミナルシーケンスを、報告されている白い背景での挙動と比較してください。デフォルトの色を使ってターミナルで診断出力を確認してください。エラーメッセージが明るい色のバリエーションを強制せずに読みやすいままであれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- go
- 領域
- cli
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 静か
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 75/100