sonar-mybatis icon indicating copy to clipboard operation
sonar-mybatis copied to clipboard

MyBatis Plugin for SonarQube: Rules to check SQL statements in MyBatis Mapper XML files

Results 11 sonar-mybatis issues
Sort by recently updated
recently updated
newest added

feat(mybatis,antlr): 增加antlr4与mybatis的xml解析器,部分标签还未修改

Bumps [spring-core](https://github.com/spring-projects/spring-framework) from 5.3.19 to 5.3.20. Release notes Sourced from spring-core's releases. v5.3.20 :star: New Features Refine CachedIntrospectionResults property introspection #28445 Improve tests and Javadoc on binding to a property...

dependencies

org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [/home/jenkins/workspace/jctest/jeecg-boot-module-system/target/classes/org/jeecg/modules/system/mapper/xml/SysAnnouncementSendMapper.xml-reduced.xml]'. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for org.jeecg.modules.system.mapper.SysAnnouncementSendMapper.q1ueryByUserId1. please check file [/home/jenkins/workspace/jctest/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysAnnouncementSendMapper.xml-reduced.xml] and file [/home/jenkins/workspace/jctest/jeecg-boot-module-system/target/classes/org/jeecg/modules/system/mapper/xml/SysAnnouncementSendMapper.xml-reduced.xml] at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:122)...

如下 mapper中的语法错误没有检测出来: ``` ```

bug

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

bug

* sonar 版本:6.7 SQL语句: delete from where id = #{id,jdbcType=BIGINT} and 1 = 1 * 初步分析: mybatislint-rules.xml配置了remediationFunction * 相关错误日志: ``` Caused by: java.lang.IllegalArgumentException: Rule 'MyBatisLint:MyBatisMapperCheckRule3' can not use 'Constant/issue' remediation...

手动安装 该插件可以从 github release 下载。 将下载的 jar 放到 $SONARQUBE_HOME/extensions/plugins 目录,并移除该插件的旧版本。 一旦完成,您将需要重新启动 SonarQube 服务器。 如何使用? 使用 maven 构建命令的示例如下: `mvn clean compile -U -Dmaven.test.skip=true -Dmaven.javadoc.skip=true sonar:sonar -Dsonar.host.url=http://127.0.0.1:9000/ -Dsonar.projectKey=demo -Dsonar.projectName=demo -Dsonar.sourceEncoding=UTF-8 -Dsonar.sources=. -Dsonar.inclusions=src/main/**...

feature_request

非常感谢博主的速度,这么快就增加了select *的规则检查。 今天体验了一下,发现有bug。 select order_id,user_id,order_amount * discount as product_amount from orders where user_id=#{user_id} and status=1 and is_del=false 这段SQL被插件扫描出来了,里面有*,但是并不是查询所有的字段。

bug

Bumps [org.springframework:spring-core](https://github.com/spring-projects/spring-framework) from 5.3.27 to 6.0.15. Release notes Sourced from org.springframework:spring-core's releases. v6.0.15 :star: New Features Skip buffer allocation in StreamUtils.copy(String) #31631 :lady_beetle: Bug Fixes <replaced-method /> unnecessarily requires explicit...

dependencies

这个插件装载sonar 8.0,然后用maven scanner,项目已加入规则,但不会触发xml扫描。何解 ?