Simplify AssertJ assertions flagged by Sonar (java:S5838)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
选择一个模块并在此评论认领该范围。在该模块中检查 SonarCloud 的 java:S5838 问题;issue 将 reader 中的 ComputeTest 第 708 行和第 767 行列为示例。只将断言替换为更具体的 AssertJ 形式,保留 Given/When/Then 结构,并避免对大型数组使用 containsExactly。运行 ./mvnw test -pl <module> -am;当测试通过且改动仅限于测试时即完成。
由索引模型根据 Issue 内容生成。
描述
SonarCloud flags 23 assertions that have a more specific AssertJ form, e.g. assertThat(map.get(k)).isEqualTo(v) should be assertThat(map).containsEntry(k, v). The more specific form gives a better failure message.
Where: reader 17 (e.g. ComputeTest:708, :767), writer 3, and one each in fsst, calcite, integration. List: java:S5838 open issues.
How: pick one module, say so in a comment here, and send one PR. Test-only and behavior-neutral: ./mvnw test -pl <module> -am must stay green. Keep the // Given / // When / // Then structure. See CONTRIBUTING.md.
Beware: AssertJ's containsExactly on big arrays is quadratic; do not use it to replace isEqualTo on arrays.
- 主要语言
- Java
- 星标
- 3
- 派生
- 2
- 平均合并
- 9 小时 19 分钟
- 30 天内合并 PR
- 154
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
dfa1/vortex-java 的其他 Issue
-
good first issue
难度 2/5 1-3 小时 新手友好度 70/100
dfa1/vortex-java#738 ·
维护者通常 1 天内回复
-
good first issue
难度 2/5 1-3 小时 新手友好度 70/100
dfa1/vortex-java#737 ·
维护者通常 1 天内回复
-
help wanted project
难度 5/5 一周以上 新手友好度 25/100
dfa1/vortex-java#729 ·
维护者通常 1 天内回复
-
enhancement good first issue
难度 3/5 1-2 天 新手友好度 72/100
dfa1/vortex-java#728 ·
维护者通常 1 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 55/100
dfa1/vortex-java#723 ·
维护者通常 1 天内回复
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 88/100
-
难度 2/5 1 小时以内 新手友好度 84/100
cpp-best-practices/project_validator#251 ·
维护者通常 1 天内回复
-
backend enhancement
难度 2/5 半天 新手友好度 70/100
damodharg6/payledger#16 ·
-
[Bug]: An initiative list with no current entry logs an error on every change可能已有人在做 @dwizard0 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
维护者通常 1 天内回复