donhui / sonar-mybatis

MyBatis Plugin for SonarQube: Rules to check SQL statements in MyBatis Mapper XML files
Other
74 stars 21 forks source link

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

Open rayer4u opened 4 years ago

rayer4u commented 4 years ago

我使用了一个包含子模块的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[bot] commented 4 years ago

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.

donhui commented 3 years ago

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