Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

goimports consistency: hook enforces gofmt only; 2 files carry goimports-style changes

オープン
#352 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@Amperstrand がすでに取り組んでいます。

2026年10月23日 から。

  • #1065 @Amperstrand による — オープン

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
静か
技術スタック
go
領域
ci-cd, tooling

調査の方向性

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

  1. 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.
  2. Document gofmt-only as the standard — explicitly state imports are hand-managed; goimports-shaped changes are unwelcome in "gofmt cleanup" PRs but not linted.
  3. 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

環境構築

はじめの一歩

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

OpenTollGate/tollgate-module-basic-go のほかの issue

OpenTollGate/tollgate-module-basic-go の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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