Repository navigation
fix(lint): select the Go model-rule forms deferred in #196 - #257
Conversation
… model rules missed error-handled-once now selects a logger reached through Default() and a logger of any receiver name, and only the function literal nearest to a log call. construction-separate-from-execution selects a package-level New of a collaborator package. no-exposed-mutable-collection selects a collection among several results and a named slice or map type declared in the same file. Refs #196 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…aralleltest paralleltest is enabled only in projects created from template-go, so the prose stays for the others. Refs #196 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Review summaryP1 (1)
Not found
The go-style 🤖 Generated with Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 024c69f9a8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…rule Refs #196 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@codex review |
Review summaryThe three Go matcher changes and the P1 (blocks merge)
P3 (optional)
Nothing in the diff raises a security concern. 🤖 Generated with Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a25d8c956b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
error-handled-once 0.41, construction-separate-from-execution 0.6 and no-exposed-mutable-collection 0.59, from the eval of 2026-11-19 (3 passes, no false positive or negative). Refs #196 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@codex review |
Review summaryI reviewed this statically. The sandbox blocked
The 🤖 Generated with Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c27cb73aab
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Refs #196 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@codex review |
Review summaryNo P0 or P1 findings. I read the diff but could not run
Other things I checked:
🤖 Generated with Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6de1d32d69
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Also record in error-handled-once that a derived logger with arguments is not matched. Refs #196 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@codex review |
|
Review summary: I read the full diff and found no issues worth blocking the merge. I couldn't run 🤖 Generated with Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e3d2e77055
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
🤖 I have created a release *beep* *boop* --- ## [0.3.1](v0.3.0...v0.3.1) (2026-11-20) ### Bug Fixes * **hooks:** do not count a printf whose format holds %n as writing nothing ([#262](#262)) ([f3a4543](f3a4543)) * **hooks:** judge gh beside commands that write nothing as gh alone ([#256](#256)) ([540bbad](540bbad)) * **hooks:** stop asking for gh calls whose target and arguments are known at hook time ([#254](#254)) ([f4aa355](f4aa355)) * **lint:** close the Rust and TypeScript items of [#196](#196) ([#259](#259)) ([1d2a81e](1d2a81e)) * **lint:** select the Go model-rule forms deferred in [#196](#196) ([#257](#257)) ([8c347fe](8c347fe)) * **lint:** widen three Python model-rule selectors deferred in [#196](#196) ([#258](#258)) ([b3fc801](b3fc801)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: furedea-release[bot] <353651101+furedea-release[bot]@users.noreply.github.com>
概要
#196 の Go の項目を origin/main で確かめ,残っていた Go のモデル規則(jev-lint,助言)の見逃しを直し,ユーザー決定(2026-11-19)に従って go-style の
t.Parallel()の文を戻した.Jev 規則は昇格しない(ADR-0027).Refs #196
項目ごとの状態
go_sealed_interface_sumtype_decl:// sumtype:declを受け入れるgo_error_no_capitalized_message:import path・シャドーgo_context_param_named_ctx/go_no_context_in_struct:import pathcontextを別名なしで import したファイルに限定)go_use_slog:import path,引数・receiver・名前付き戻り値のシャドーgo_use_slog:ローカル変数のシャドーLimits:に記録.スコープ解析が要る)go_iota_enum_typed:iota + 1などの式Limits:に記録.構文では enum と区別できない)go_no_generated_mocks://go:generate経由,// Code generated byヘッダーgo_no_context_in_struct:*context.Contexterror-handled-once:slog.Default().Error(...),log.Default().Printf(...)error-handled-once:receiver 名がlog/logger以外(l,audit),receiver のOutputerror-handled-once:入れ子のクロージャのログで親関数も選ばれるseverity: errorを hook のブロックに結びつけるstatic_rule_scan.pyが severity error を error として扱う)construction-separate-from-execution:client.New(...)errors/uuid/ hash / container などの標準のNewは除く)no-exposed-mutable-collection:複数戻り値([]string, error)no-exposed-mutable-collection:名前付きの slice / map 型no-comment-restating-code:関数直前の doc commentno-reaching-through-collaborators:プロパティ連鎖t.Parallel()の文test_go_rules_select_the_functions_they_ask_about,test_main_is_thin_selects_func_main_of_package_maintest_main_is_thin_selects_...がcommand-query-namingに指摘されるLimits(レビューで記録したもの)
matcher を直すと baseline がまた無効になり,この PR では eval を再実行しない(ユーザーの指示)ため,規則ファイルの
Limits:に記録した(6de1d32d).error-handled-once:ログに似た呼び出しも選ぶ(http.Error,cmd.Output(),c.Error(err),s.t.Fatal(...)).自分で実行するクロージャ内のログ(defer func() { log.Error(err) }())は親関数を選ばない.引数付きで派生したロガー(slog.With("k", v).Error(...),logrus のlog.WithError(err).Error(...))を見逃す(見逃し.後続).construction-separate-from-execution:log.New,slog.New,zap.New,メソッドのtmpl.New("x")も選ぶ.no-exposed-mutable-collection:(Items, error)や名前付きの(items Items)など括弧で書いた結果リスト内の名前付き型と,別ファイルで宣言した型を見逃す(見逃し.次に eval を回すときに直す後続).*[]T,chan []byte,func() []stringも選ぶ.判断が要るもの
t.Parallel()以外にも削除した(testifylintのrequire/assert,usetestingのt.TempDir()/t.Setenv()など).ユーザー決定の方針(template でしか有効でない linter の規則は文を残す)をこれらにも当てはめて戻すかを決めてほしい.この PR では明示されたt.Parallel()だけを戻した.検証
uv run pytest tests/test_model_rule_files.py:選択のテスト 3 件を先に足して失敗を確認し,matcher の修正後に通った.uv run pytest tests/test_model_rule_files.py:17 件通過(baseline の replay を含む).jev-lint eval --accept -r 3(ユーザーが 2026-11-19 に実行):3 規則とも fp / fn 0.閾値を fitted midpoint に合わせた.error-handled-once0.37 → 0.41(最高の clean 0.06,最低の bad 0.75),construction-separate-from-execution0.6(0.24 / 0.96),no-exposed-mutable-collection0.57 → 0.59(0.24 / 0.93).error-handled-onceとno-exposed-mutable-collectionは blind のままinconclusive:を残した.log.Error().Err(err).Msg(...)の見逃し)は a25d8c9 で修正.P1(baseline の無効化)は c27cb73 で解消.計画との差
なし.
🤖 Generated with Claude Code