chore: shellcheck 除外リストを外部ファイルに分離 - #507
Conversation
package.json の shellcheck スクリプトでハードコードしていた 10個の grep -v 除外パターンを script/.shellcheck-exclude に外部化。 保守性とレビュー性を改善。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe shellcheck script configuration is being refactored to externalize exclusion patterns. Rather than maintaining a long inline regex within the npm script, exclusions are now read from a dedicated Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔍 AI Code Review (Local Hook)Models: Codex (default) / Gemini (default) 🤖 Codex Review以下は、 問題点:
判定: patch is incorrect 自然な次のステップ:
✨ Gemini Reviewご提示いただいたdiffをレビューいたしました。 指摘事項
判定patch is correct 理由
信頼度スコア0.95
|
🔍 AI Code Review (Local Hook)Models: Codex (default) / Gemini (default) 🤖 Codex Review指摘事項はありません。変更は単純な除外リストの外部化で、既存の挙動(部分一致での除外)を維持しています。 判定 ✨ Gemini Review発見事項
判定: patch is correct 信頼度スコア: 1.0 🤖 Generated by post_pr_ai_review.py hook |
PR レビュー: chore: shellcheck 除外リストを外部ファイルに分離総評設計の方向性は正しく、CI も全てグリーン。変更は小さく的確です。ただし、1点の技術的な問題と、いくつかの改善提案があります。 問題点ファイル末尾の改行なし(要修正)
POSIX テキストファイルの仕様として末尾改行が必要であり、 確認事項(動作に問題なし)
変更前:
改善提案(任意)コメントの追加: 除外理由をファイル内に記載するとメンテナンス性が向上します。例: まとめ
末尾改行の修正後、マージ可能と判断します。 |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
package.json (1)
1-51:⚠️ Potential issue | 🟠 MajorCommit type
choreis prohibited forpackage.jsonchanges.The PR title uses
chore:but this file matchespackage*.json. As per coding guidelines, commits touchingpackage*.jsonmust use a release-triggering commit type (feat,fix,perf,revert, ordocs) —choreis explicitly excluded.Consider re-titling the commit, e.g.:
docs: shellcheck 除外リストを外部ファイルに分離or
fix: shellcheck 除外リストを外部ファイルに分離🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@package.json` around lines 1 - 51, The commit type must not be "chore" for changes touching package*.json (this file package.json, specifically the scripts.shellcheck change) — update the commit title to a release-triggering type (e.g., "fix:", "feat:", "perf:", "docs:", or "revert:") and reword the message accordingly; amend the existing commit (git commit --amend -m "...") or create a new commit with the corrected prefix and a concise description such as moving the shellcheck exclude list to an external file so CI and release tooling accept the change.
🧹 Nitpick comments (1)
script/.shellcheck-exclude (1)
10-10: Add a trailing newline to the file.POSIX specifies that patterns in a pattern file must be terminated by a
<newline>. The file currently ends atlib/platform.shwithout a trailing newline. GNU grep silently supplies a newline for input files ending in a non-newline character, so this works in practice, but adding the trailing newline ensures strict POSIX compliance and avoids unexpected behaviour on non-GNUgrepimplementations.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@script/.shellcheck-exclude` at line 10, The pattern file entry "lib/platform.sh" lacks a trailing newline; open the .shellcheck-exclude file and ensure the line containing the literal token lib/platform.sh is terminated with a newline character (add an empty line break at end of file) so the pattern file conforms to POSIX requirements.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@package.json`:
- Around line 1-51: The commit type must not be "chore" for changes touching
package*.json (this file package.json, specifically the scripts.shellcheck
change) — update the commit title to a release-triggering type (e.g., "fix:",
"feat:", "perf:", "docs:", or "revert:") and reword the message accordingly;
amend the existing commit (git commit --amend -m "...") or create a new commit
with the corrected prefix and a concise description such as moving the
shellcheck exclude list to an external file so CI and release tooling accept the
change.
---
Nitpick comments:
In `@script/.shellcheck-exclude`:
- Line 10: The pattern file entry "lib/platform.sh" lacks a trailing newline;
open the .shellcheck-exclude file and ensure the line containing the literal
token lib/platform.sh is terminated with a newline character (add an empty line
break at end of file) so the pattern file conforms to POSIX requirements.
|
🎉 This PR is included in version 1.81.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
- .devcontainer/README.md / VERSIONING.md: config-base イメージバージョンを v1.54.0 → v1.81.1 に更新
- docs/tool-catalog.md:
- npm 11.10.0 → 11.10.1, @openai/codex 0.101.0 → 0.104.0, @google/gemini-cli 0.28.2 → 0.29.5
- Vercel CLI 50.17.1 → 50.22.1, n8n 2.7.5 → 2.8.3, yaml-language-server 1.19.2 → 1.20.0
- @commitlint/{cli,config-conventional} 20.4.1 → 20.4.2
- Features テーブルから node Feature を削除(PR #509 で devcontainer.json より削除済み)
- セクション 6.1 の最新バージョン記載を 1.58.0+ → 1.81.1 に更新
- script/README.md: .shellcheck-exclude ファイルの説明を追加(PR #507)
Closes #513
Co-authored-by: keito4 <keito4@users.noreply.github.com>
Summary
package.jsonのshellcheckスクリプトにハードコードされていた 10 個のgrep -v除外パターンをscript/.shellcheck-excludeファイルに外部化grep -vFf script/.shellcheck-excludeに置き換え、保守性とレビュー性を改善Changes
script/.shellcheck-excludepackage.jsongrep -vFf方式に変更Test plan
npm run shellcheckが変更前と同じ結果になることを確認🤖 Generated with Claude Code
Summary by CodeRabbit