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

当前的sonarqube lts版本不能检查resources目录 #25

Open
rayer4u opened this issue Sep 25, 2020 · 2 comments
Open

当前的sonarqube lts版本不能检查resources目录 #25

rayer4u opened this issue Sep 25, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@rayer4u
Copy link

rayer4u commented Sep 25, 2020

我使用了一个包含子模块的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
Copy link

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.72. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@issue-label-bot issue-label-bot bot added the bug Something isn't working label Sep 25, 2020
@donhui
Copy link
Owner

donhui commented Dec 11, 2020

要想分析 mybatis mapper 文件, src/main/resources 目录必须在 sonar.sources 中。
加上下面这个参数试试
-Dsonar.sources=.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants