【问题标题】:package naming issue in sonarqubesonarqube 中的包命名问题
【发布时间】:2021-03-10 17:00:43
【问题描述】:

当我在 sonarqube 中运行我的 jar 以进行代码覆盖时,我得到重命名这个包名以匹配正则表达式,给出的包名是 routeBuilder。有人可以告诉我如何更改吗?

尝试将其更改为以小写形式路由构建器。

包 com.sample.loading.routeBuilder

【问题讨论】:

    标签: java sonarqube


    【解决方案1】:

    你点击的是https://rules.sonarsource.com/java/tag/convention/RSPEC-120

    此规则规定包的名称应符合正则表达式,不允许大写字母。

    要修复 SQ 警告,您应该将包名称更正为 com.sample.loading.routebuildercom.sample.loading.route_builder

    请注意,当前的默认表达式现在允许使用下划线。之前没有,这里已经讨论过Package names should comply with a naming convention (squid:S00120) and underscore

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-05-15
      • 2015-08-17
      • 2011-08-26
      • 1970-01-01
      • 2016-03-20
      • 1970-01-01
      • 2016-08-11
      • 1970-01-01
      相关资源
      最近更新 更多