Consider adding auto-commenting option for lint to add lint ignores
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
まず、lint コマンドに既存する --error-format=config-ignore-yaml の経路と、issue で言及されている formatter/AST の境界を確認します。// buf:lint:ignore 行を挿入する際の構文とエッジケースを特定し、その後、対象を絞ったテストを追加して、生成されたファイルが期待どおりの内容を保持することを検証します。
索引モデルが issue の本文から書いたものです。
説明
Basically, in addition to --error-format=config-ignore-yaml, add something like an --auto-comment flag that automatically adds // buf:lint:ignore lines. My intuition is that this would naturally require us to be able to consume the AST and rewrite the whole file, i.e. the formatter, but a customer came up with a solution that might just be generic enough (we need to go through edge cases though):
fileContent := ""
for lineNumber, l := range fileLines {
for i < len(lps) && lineNumber+1 == lps[i].StartLine {
var prefix string
runes := []rune(l)
for i, c := range runes {
if c != ' ' && c != '\t' {
prefix = string(runes[0:i])
break
}
}
fileContent += fmt.Sprintf("%s// buf:lint:ignore %s %s\n", prefix, lps[i].RuleType, lps[i].Message)
i++
}
fileContent += l
fileContent += "\n"
}
if err := ioutil.WriteFile(path, []byte(fileContent), 0644); err != nil {
panic(err)
}
- 主要言語
- Go
- スター
- 11.5k
- フォーク
- 376
- 平均マージ
- 2日 3時間
- マージ済み PR(30日)
- 21
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bufbuild/buf のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 48/100
メンテナーはふだん 1 日以内に返信
-
Feature
難易度 3/5 1〜2日 初心者へのやさしさ 56/100
bufbuild/buf#4784 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Feature
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
bufbuild/buf#4722 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Add a merge-base option to the buf-breaking check再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンFeature
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
bufbuild/buf#4495 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster no-stale P2
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
openclaw/crabbox#3249 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
ec2-subnet, security-group and internet-gateway skip all resources when one is deleted during the scan対応中かも @toabctl が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
gruntwork-io/cloud-nuke#1208 ·
メンテナーはふだん 5 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
snowflakedb/gosnowflake#1872 ·