Skip to content

fix: CLAUDE.md symlink の prettier 警告を解消 - #493

Merged
keito4 merged 1 commit into
mainfrom
fix/remove-o3-agents-md
Feb 21, 2026
Merged

fix: CLAUDE.md symlink の prettier 警告を解消#493
keito4 merged 1 commit into
mainfrom
fix/remove-o3-agents-md

Conversation

@keito4

@keito4 keito4 commented Feb 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • CLAUDE.md が AGENTS.md への symlink に変更されたが、core.symlinks=false 環境ではテキストファイルとして扱われ prettier チェックが失敗する問題を修正
  • .prettierignoreCLAUDE.md を追加して警告を解消

Test plan

  • npm run format:check 通過
  • npm run lint 通過
  • npm test 通過(101 tests passed)
  • pre-commit hooks 全通過

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated development tooling configuration to exclude additional files from code formatting processes.

core.symlinks=false 環境で CLAUDE.md がテキストファイルとして
扱われるため prettier チェックが失敗する問題を .prettierignore で回避

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Feb 21, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

The .prettierignore file is updated to include CLAUDE.md in the ignore list, preventing Prettier from applying code formatting rules to that file. This is a straightforward configuration addition with no functional changes.

Changes

Cohort / File(s) Summary
Configuration
.prettierignore
Added CLAUDE.md to the ignore list to prevent Prettier from formatting the file.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Suggested labels

size/XS

Poem

🐰 A file named CLAUDE finds its rest,
No Prettier's touch, no formatting quest,
In the ignore list, peaceful and free,
This little change sets the rabbit's glee! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding CLAUDE.md to .prettierignore to resolve Prettier warnings related to a symlink issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/remove-o3-agents-md

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ebdeb3d5c6

ℹ️ 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".

Comment thread .prettierignore
.agents/skills/

# Symlinks (git core.symlinks=false stores as text files)
CLAUDE.md

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Limit CLAUDE.md ignore pattern to repository root

The new CLAUDE.md entry uses gitignore-style matching, so it ignores every file named CLAUDE.md (including the real markdown file at .claude/CLAUDE.md), not just the root symlink this change is trying to suppress. As a result, format:check stops validating non-symlink CLAUDE docs and formatting regressions there can slip through undetected. Use a root-anchored pattern (for example /CLAUDE.md) to exclude only the symlink case.

Useful? React with 👍 / 👎.

@claude

claude Bot commented Feb 21, 2026

Copy link
Copy Markdown
Contributor

レビュー

変更の概要

core.symlinks=false 環境でシンボリックリンク CLAUDE.md がテキストファイルとして扱われ prettier チェックが失敗する問題を .prettierignore への追加で解消しようとするアプローチは 正しい方向性 です。


問題点

既存コメント(P2)で指摘されているとおり、パターンのルートアンカーが欠落しています

gitignore 形式のパターンでは、アンカーなしの CLAUDE.md はディレクトリツリー全体にマッチします。
結果として以下の両ファイルが prettier チェックから除外されます。

ファイル サイズ 用途
/CLAUDE.md 9 bytes(symlink) 除外したいターゲット
/.claude/CLAUDE.md 5458 bytes(実体) 誤って除外されるファイル

/.claude/CLAUDE.md はプロジェクトの主要な設定ドキュメントであるため、フォーマット検証が外れると品質ゲートのカバレッジに穴が生じます。

修正案

-CLAUDE.md
+/CLAUDE.md

ルートアンカー(先頭に /)を付けることで、リポジトリルートの CLAUDE.md のみが対象になります。


その他の観点

  • アプローチの妥当性: .prettierignore で symlink を除外する方法は適切です。
  • テスト計画: PR に記載されている手動確認項目(format:check / lint / test / pre-commit hooks)は十分です。
  • コメントの品質: 追加された # Symlinks (git core.symlinks=false stores as text files) は理由が明確で適切です。

結論

パターンを /CLAUDE.md(ルートアンカー付き)に修正すれば LGTM です。

@keito4
keito4 merged commit 328cee1 into main Feb 21, 2026
6 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.81.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions github-actions Bot added the released リリース済み label Feb 22, 2026
@keito4
keito4 deleted the fix/remove-o3-agents-md branch March 1, 2026 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released リリース済み

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant