Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements the ignore_tail_expr_idents feature that allows specifying identifiers to ignore during hooking, even when they match other hook criteria like result_types or tail_expr_idents. The feature helps provide more granular control over which expressions get hooked.
Key changes:
- Added
ignore_tail_expr_identsconfiguration option that works as a blacklist for tail expressions - Enhanced tail expression hooking logic to respect the ignore list while maintaining existing behavior
- Updated tests to verify the new functionality works correctly with both standalone usage and integration with existing features
Reviewed Changes
Copilot reviewed 148 out of 150 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| todo.md | Updated task tracking for the completed feature implementation |
| hooq/docs/ja/README.md | Updated Japanese documentation with new version info and enhanced examples |
| hooq/docs/README.md | Updated English documentation with new version info and enhanced examples |
| hooq/Cargo.toml | Version bump to 0.1.2 and dependency updates |
| hooq-macros/tests/walker/* | Changed test expectations from Ok to Err to accommodate new default behavior |
| hooq-macros/tests/special/* | Updated tests with ignore_tail_expr_idents usage and version changes |
| hooq-macros/src/impls/walker/mod.rs | Core logic changes to support ignore list in tail expression hooking |
| hooq-macros/src/impls/walker/hook_expr.rs | Extracted hook expression logic into separate module |
| hooq-macros/src/impls/inert_attr/parse.rs | Added parsing support for ignore_tail_expr_idents and "!" prefix notation |
| hooq-macros/src/impls/inert_attr/context.rs | Added context methods for checking ignore list patterns |
| hooq-macros/src/impls/flavor/* | Updated flavor system to support the new configuration option |
| Cargo.toml | Workspace version bump to 0.1.2 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 148 out of 150 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
mask_project_root が指定したパス以下のファイルすべてを見ていたために問題を起こしていたので、 指定したパス直下のファイルのみを対象にするように修正した
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 149 out of 151 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
hooq-macros/tests/walker/expr/binary.expanded.rs:43
- The expanded test output shows that the hook method was removed entirely from this function's tail expression. This suggests the
ignore_tail_expr_identsfeature is working, but the test should verify this behavior explicitly rather than just checking compilation.
+ c()
.inspect(|_| {
{
::std::io::_print(format_args!("tag: {0}\n", "(no tag)"));
};
})?,
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
📌 Overview / 概要
表題の通り。
tail_expr_identsに入っていない場合でもreturn_typesが合致している場合などにOkにフックが入ってしまう問題があった。return_typesに合致するために、末尾Exprやreturnがフック対象である時でも、ignore_tail_expr_identsに含まれる場合はフックしないようにした⚙ Changes / 変更点
0.1.1->0.1.2🧪 Tests / テスト
ignore_tail_expr_idents機能を直接試すテストの追加ignore_tail_expr_idents機能の効果を検証するようにテストを修正📚 Related Issues / 関連Issue
todo.md 記載の内容
✅ Checklist