-
Notifications
You must be signed in to change notification settings - Fork 0
chore: add CodeRabbit configuration #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json | ||
| language: ja | ||
| early_access: false | ||
| tone_instructions: | | ||
| 日本語で簡潔かつ建設的にレビューしてください。 | ||
| 指摘の根拠(PHPのバージョン依存、型安全性、Result型の不変条件など)を明示してください。 | ||
|
|
||
| reviews: | ||
| profile: assertive | ||
| request_changes_workflow: false | ||
| high_level_summary: true | ||
| poem: false | ||
| review_status: true | ||
| collapse_walkthrough: false | ||
|
|
||
| auto_review: | ||
| enabled: true | ||
| drafts: false | ||
| base_branches: | ||
| - main | ||
|
|
||
| path_filters: | ||
| - "!vendor/**" | ||
| - "!**/*.lock" | ||
| - "!.phpunit.result.cache" | ||
| - "!.php-cs-fixer.cache" | ||
| - "!.phpstan/**" | ||
|
|
||
| path_instructions: | ||
| - path: "src/**/*.php" | ||
| instructions: | | ||
| - PHP 8.4 以上の構文・機能を前提にレビューする。 | ||
| - Rust の Result<T, E> に倣った API 設計を尊重し、Ok / Err / Result の不変条件を崩していないか確認する。 | ||
| - 例外による暗黙のエラー伝播ではなく、Result 型での明示的なエラーハンドリングを推奨する。 | ||
| - readonly / final / 型宣言(戻り値・引数・プロパティ)の徹底をチェックする。 | ||
| - 公開 API の破壊的変更がある場合は明示的に指摘する。 | ||
| - path: "tests/**/*.php" | ||
| instructions: | | ||
| - PHPUnit のテストとして、t-wada 流 TDD の Red→Green→Refactor を意識しているかをチェックする。 | ||
| - 1 テスト 1 アサーション主義に偏りすぎず、振る舞い単位で検証されているか確認する。 | ||
| - エッジケース(Ok/Err 双方、ネスト、map/and_then などのコンビネータ)が網羅されているかを見る。 | ||
| - path: "**/*.md" | ||
| instructions: | | ||
| - サンプルコードは PHP 8.4+ で実行可能か確認する。 | ||
| - README の API 説明と src の実装が一致しているかを確認する。 | ||
| - path: ".github/workflows/**" | ||
| instructions: | | ||
| - 使用するアクションはバージョンを固定(SHA か明示的なタグ)しているかを確認する。 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| - secrets の取り扱いに不適切なものがないかをチェックする。 | ||
|
|
||
| tools: | ||
| phpstan: | ||
| enabled: true | ||
| level: default | ||
| phpmd: | ||
| enabled: false | ||
| github-checks: | ||
| enabled: true | ||
| timeout_ms: 90000 | ||
| languagetool: | ||
| enabled: true | ||
| enabled_only: false | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| level: default | ||
| markdownlint: | ||
| enabled: true | ||
| yamllint: | ||
| enabled: true | ||
| actionlint: | ||
| enabled: true | ||
| gitleaks: | ||
| enabled: true | ||
|
|
||
| chat: | ||
| auto_reply: true | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
readonlyやfinalはクラスにのみ適用可能な修飾子です。src/配下にはResult.phpインターフェースが含まれているため、AI がインターフェースに対してもこれらの適用を求めてしまう誤検知(ハルシネーション)を防ぐため、「クラスにおける」という限定を加えることを推奨します。- クラスにおける readonly / final の適用、および型宣言(戻り値・引数・プロパティ)の徹底をチェックする。