Skip to content
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

code quality improvement: clear the issues reported by SonarLint Plugin in some Test classes #3727

Closed
wants to merge 5 commits into from

Conversation

ChlZhYa
Copy link

@ChlZhYa ChlZhYa commented May 13, 2021

Ⅰ. Describe what this PR did

code quality improvement: clear the issues reported by SonarLint Plugin

Ⅱ. Does this pull request fix one issue?

fixes #3690

Ⅲ. Why don't you add test cases (unit test/integration test)?

I used the IDEA SonarLint plugin scanning the APITest.java file and it reported nothing

Ⅳ. Describe how to verify it

before the modification
image

after
image

Ⅴ. Special notes for reviews

@funky-eyes
Copy link
Contributor

请扫描所有模块,争取一次性解决此问题

@funky-eyes
Copy link
Contributor

另外请在你的本地绑定你的github信息,否者提交上的pr会无关联的github账号

@ChlZhYa
Copy link
Author

ChlZhYa commented May 13, 2021

请扫描所有模块,争取一次性解决此问题

好的。我看全项目 sonarlint 总共有 4000 多个 issue,还是按照模块来吧

@codecov-commenter
Copy link

codecov-commenter commented May 13, 2021

Codecov Report

Merging #3727 (6a7d6a3) into develop (69d1297) will increase coverage by 0.02%.
The diff coverage is n/a.

❗ Current head 6a7d6a3 differs from pull request most recent head 16b8639. Consider uploading reports for the commit 16b8639 to get more accurate results
Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #3727      +/-   ##
=============================================
+ Coverage      51.31%   51.33%   +0.02%     
+ Complexity      3576     3575       -1     
=============================================
  Files            646      645       -1     
  Lines          21809    21798      -11     
  Branches        2738     2738              
=============================================
- Hits           11191    11190       -1     
+ Misses          9480     9470      -10     
  Partials        1138     1138              
Impacted Files Coverage Δ Complexity Δ
common/src/main/java/io/seata/common/XID.java 91.66% <0.00%> (-0.65%) 7.00% <0.00%> (-1.00%)
...in/java/io/seata/core/store/DistributedLockDO.java

@funky-eyes
Copy link
Contributor

请扫描所有模块,争取一次性解决此问题

好的。我看全项目 sonarlint 总共有 4000 多个 issue,还是按照模块来吧

这个改动没必要分成多个模块,因为改出问题了,ci是不会通过的

@funky-eyes
Copy link
Contributor

funky-eyes commented May 13, 2021

请扫描所有模块,争取一次性解决此问题

好的。我看全项目 sonarlint 总共有 4000 多个 issue,还是按照模块来吧

这个改动没必要分成多个模块,因为改出问题了,ci是不会通过的,或者你可以几个模块几个模块的来,比如先改测试用例相关

@@ -64,7 +64,7 @@
*
* @author leizhiyuan
*/
public class DefaultCoordinatorTest {
class DefaultCoordinatorTest {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

图片

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

报错了。这个public先恢复过来吧。

@wangliang181230 wangliang181230 changed the title code quality improvement: clear the issues reported by SonarLint Plug… code quality improvement: clear the issues reported by SonarLint Plugin in some Test classes May 15, 2021
@ChlZhYa ChlZhYa closed this May 15, 2021
@wangliang181230
Copy link
Contributor

额,为什么要关闭掉啊?

@ChlZhYa
Copy link
Author

ChlZhYa commented May 16, 2021

额,为什么要关闭掉啊?

你好,我在修复完一些 issues 之后,发现目前依赖 grpc 模块的 UT 无法运行。因为目前 protobuf 相关组件没有提供针对 Apple M1 的 osx-aarch_64 版本的 jar 包,即使直接指定 <os.detected.arch> 为 osx_x86_64 后仍然无法正常运行,所以目前修改的一些问题本人无法运行 UT。在跟踪完 protobuf/grpc 相关依赖的仓库 issue 后,发现这个问题似乎没有得到积极的跟进,最新的动态在
protobuf ,所以目前先关闭该 PR。后续会继续关注社区,谢谢各位大佬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimize Request: Improve code quality.(提升代码质量请求)
4 participants