Skip to content

Clarify nolint comment placement in error messages#9

Merged
tomoemon merged 1 commit into
mainfrom
fix/nolint-hint-message
Apr 2, 2026
Merged

Clarify nolint comment placement in error messages#9
tomoemon merged 1 commit into
mainfrom
fix/nolint-hint-message

Conversation

@tomoemon

@tomoemon tomoemon commented Apr 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • nolint 抑制ヒントに「to this line」を追加し、どの行に //nolint:spantool コメントを付ければよいか明示するようにした
  • 対象: callback 未検出、ToStruct 型解決不能、Params 非リテラルの3種類のエラーメッセージ

設計の背景

エラーメッセージの報告行と nolint の検出行は一致しているが、ユーザーにはそれが自明でなかった。
メッセージ末尾に「to this line」を付与するだけで解消できるため、最小限の変更で対応した。

Test plan

  • go test ./... が通ること(既存テストは strings.Contains でチェックしているため影響なし)

🤖 Generated with Claude Code

Add "to this line" to nolint suppression hints so users know exactly
which line needs the //nolint:spantool comment.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tomoemon
tomoemon merged commit f3a1b97 into main Apr 2, 2026
2 checks passed
@tomoemon
tomoemon deleted the fix/nolint-hint-message branch April 2, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant