运维类

SonarQube使用[1]

By ronz 67 Views 2 MIN READ 0 Comments
  1. 建立docker
  2. 下载CLI
    https://docs.sonarsource.com/sonarqube/latest/analyzing-source-code/scanners/sonarscanner/
    注:可能需要FQ才能看见下载链接
  3. 在server端创建 project 和 token
  4. 客户端运行
    sonar-scanner -Dsonar.projectKey=项目名字 -Dsonar.sources=./ -Dsonar.host.url=生成的URL -Dsonar.token=生成的token
    注意,如果遇到这类的sb错误
    java.lang.IllegalStateException: Error when executing blame for file
    可以添加
    -Dsonar.test.exclusions=文件所在的路径

本文由 ronz 原创

采用 CC BY-NC-SA 4.0 协议进行许可

转载请注明出处:https://upsilon20.com/archives/10/

TAGS: No tags

YOU MAY ALSO LIKE

  • Nothing related yet, explore something else.

0 COMMENTS

LEAVE A REPLY

苏ICP备2024088959号-2 苏公网安备32060202001138