Repository navigation
feat: auto-run Java lint after every Java edit tool - #3
Merged
Merged
Conversation
added 2 commits
November 21, 2026 19:04
The post-execute hook only matched write and edit, so edits made through str_replace_editor or insert were never checked. Match every built-in tool that can write a file, while excluding str_replace_editor's read-only view command.
- checkstyle: post-execute on Java edits (was running all enabled checkers) - pmd: fire-and-forget at agent/turn-stopping after a Java edit - spotbugs: tools/pre-execute gate on git commit (denies with findings) - refresh the system prompt and tool description to match Co-authored-by: user decision m14280
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
背景
AI 改完 Java 后本应自动跑代码检查并把报告塞进编辑结果,但钩子只匹配
write/edit两个工具。本会话实际用
str_replace_editor/insert改文件,检查从未触发。改动
JAVA_WRITE_TOOLS集合,覆盖 write / edit / insert / undo_last_edit / str_replace_editor / ops_write_file / ops_edit_fileeditedJavaPath统一解析路径,排除str_replace_editor的只读view命令验证
node --check通过;12 组匹配用例单测全绿(含各写工具、view 排除、非 java、无参数)限制