Analysis hints for assertj: assertThat does not modify its argument
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start with the existing libs/test (JUnit Jupiter) hints as the model: follow how it is wired through a compile dependency in maddi-aapi-archive, an entry in CompileAnalysisHints.LIBRARIES, and one in LoadAnalysisResults.ANALYZED_RESULTS. The annotation targets are the assertThat*/then* entry points of org.assertj.core.api.Assertions, WithAssertions and BDDAssertions. Done when the argument of those methods is marked @NotModified and the langchain4j-core fields named in the issue (UserMessage.contents, ChatRequest.messages, AiMessage.toolExecutionRequests) are no longer reported as modified.
由索引模型根据 Issue 内容生成。
描述
AssertJ has no hints. An unannotated library parameter defaults to modified, so every assertThat(x) in a project's test code makes x modified. Through the reachability pass's shared callee-parameter node, that reaches the fields and parameters behind every argument passed there.
Measured on langchain4j-core (CodeLaser/maddi-mod#24): UserMessage.contents, ChatRequest.messages and AiMessage.toolExecutionRequests are modified only because tests pass them to WithAssertions.assertThat(List) / Assertions.assertThat(List).
Minimum: @NotModified on the argument of the assertThat*/then* entry points of org.assertj.core.api.Assertions, WithAssertions and BDDAssertions. Better: the Abstract*Assert methods, which read the actual value. Like libs/test (JUnit Jupiter), this needs a compile dependency in maddi-aapi-archive, an entry in CompileAnalysisHints.LIBRARIES and one in LoadAnalysisResults.ANALYZED_RESULTS.
- 主要语言
- Java
- 星标
- 1
- 派生
- 1
- 平均合并
- 1 小时 34 分钟
- 30 天内合并 PR
- 7
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
CodeLaser/maddi 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
build/ci good first issue
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 45/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 40/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 67/100
Vakore/ZappierGames#184 ·
-
bug
难度 2/5 1-3 小时 新手友好度 70/100
lugassawan/swe-workbench#823 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
cassiancc/Raspberry-Core#69 ·
-
难度 2/5 1-3 小时 新手友好度 85/100
IronCoreLabs/ironcore-alloy#351 ·
-
难度 2/5 1-3 小时 新手友好度 79/100
checkstyle/checkstyle#22145 ·
维护者通常 1 天内回复