sonar-mybatis
sonar-mybatis copied to clipboard
当前的sonarqube lts版本不能检查resources目录
我使用了一个包含子模块的spring boot项目,无论如何配置Included sources路径,都不能让他扫描mybatis目录 执行命令
mvn sonar:sonar \
-Dsonar.projectName=qxx_server_master \
-Dsonar.projectKey=qxx_server_master \
-Dsonar.host.url=http://192.168.0.101:9000 \
-Dsonar.login=xxxxxxx
日志相关
SonarQube version: 7.9.4
...
[INFO] Project configuration:
[INFO] Included sources: */src/main/**, */src/main/resources/**
[INFO] Indexing files of module 'qxx_server_master'
[INFO] Base dir: /home/ray/develop/working/learn/learn-api
[INFO] Source paths: pom.xml, src/main/java
[INFO] Test paths: src/test/java
[INFO] Included sources: */src/main/**, */src/main/resources/**
[INFO] Indexing files of module 'qxx_server_master'
[INFO] Base dir: /home/ray/develop/working/learn/learn-model
[INFO] Source paths: pom.xml, src/main/java
[INFO] Included sources: */src/main/**, */src/main/resources/**
[INFO] Indexing files of module 'qxx_server_master'
[INFO] Base dir: /home/ray/develop/working/learn/learn-util
[INFO] Source paths: pom.xml, src/main/java
[INFO] Included sources: */src/main/**, */src/main/resources/**
[INFO] Indexing files of module 'qxx_server_master'
[INFO] Base dir: /home/ray/develop/working/learn/learn-web
[INFO] Source paths: src/main/webapp, pom.xml, src/main/java
[INFO] Included sources: */src/main/**, */src/main/resources/**
结果并没有任何src/main/resources目录代码,只有src/main/java和src/main/webapp代码
Issue-Label Bot is automatically applying the label bug
to this issue, with a confidence of 0.72. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
要想分析 mybatis mapper 文件, src/main/resources 目录必须在 sonar.sources 中。 加上下面这个参数试试 -Dsonar.sources=.