goimports consistency: hook enforces gofmt only; 2 files carry goimports-style changes
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
Read the pre-commit hook from #343 and the repository's CI configuration to see how formatting checks are currently enforced. The issue presents three options and recommends a one-shot normalization plus CI enforcement, but maintainer agreement is needed before the scope is settled. Done means implementing the chosen policy and bringing the named files—lightning.go, offline_wallet_integration_test.go, and validator.go—into line with it.
索引モデルが issue の本文から書いたものです。
説明
From the #341 cold-review thread — follow-up as offered there.
Observation
The pre-commit hook (#343) enforces gofmt -l on staged files, but the repo currently contains goimports-style changes (import reordering/grouping) that gofmt neither produces nor checks. Concretely flagged in the #341 review: lightning.go, offline_wallet_integration_test.go, validator.go (the last fixed in #341's own review round). Meanwhile #341's cleanup PR itself introduced goimports-shaped diffs — meaning the repo's import style is drifting between "whatever the contributor's editor does" and "what gofmt allows".
Options
- Add a goimports check — extend the pre-commit hook and/or CI with
goimports -l(needs goimports installed on contributor machines / a CI step). Strictest: repo becomes goimports-clean going forward. - Document gofmt-only as the standard — explicitly state imports are hand-managed; goimports-shaped changes are unwelcome in "gofmt cleanup" PRs but not linted.
- One-shot normalize + CI pin — a single goimports-everything PR (like #341 but for imports), then enforce in CI only (not the local hook), avoiding the contributor-tooling requirement.
Option 3 is probably the sweet spot: local hooks stay dependency-free (consistent with #343's portability posture), CI does the enforcing, and the one-shot PR makes the baseline clean.
Happy to take whichever option is preferred — the one-shot normalize is mechanical.
- 主要言語
- Go
- スター
- 12
- フォーク
- 14
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 201
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
OpenTollGate/tollgate-module-basic-go のほかの issue
-
changelog: dependency-security sweep missing from [Unreleased] [Amperstrand fork #105 review debt]オープン
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
OpenTollGate/tollgate-module-basic-go#1055 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
OpenTollGate/tollgate-module-basic-go#1027 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
OpenTollGate/tollgate-module-basic-go#1026 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
OpenTollGate/tollgate-module-basic-go#833 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
OpenTollGate/tollgate-module-basic-go#813 ·
メンテナーはふだん 1 日以内に返信
OpenTollGate/tollgate-module-basic-go の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
prime-radiant-inc/evener#5028 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
[BUG] v4.2.9 PostgreSQL 启动迁移失败:DROP INDEX CURRENT_SCHEMA() 语法错误対応中かも @renovate が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
OpenListTeam/OpenList#3267 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
openpubkey/opkssh#670 ·
メンテナーはふだん 1 日以内に返信