【问题标题】:Is there a way to integrate sonarlint plugin in pom.xml有没有办法在 pom.xml 中集成 sonarlint 插件
【发布时间】:2016-05-06 22:05:42
【问题描述】:

我想将 sonarlint 插件添加到我的项目中。当我使用 maven 构建时,插件应该会自动启用而无需我的干预。有什么办法可以做到吗?

【问题讨论】:

  • 启用是什么意思? SonarLint 在 IDE 中使用,必须在每个 IDE 中安装。
  • 我的意思是插件应该自动安装到ide中。当 maven 构建项目时,通过在 pom.xml 的 pluginmanagement 标签中添加一些东西
  • 你能给我一些建议吗,我可以通过添加一些罐子或任何可以帮助的东西来做到这一点,基本上我不想从 eclipse marketeclipse 安装它
  • SonarLint 不是 maven 插件;您需要在 Eclipse 或 IntelliJ 中安装插件。在这两个 IDE 中,您可以从本地文件安装它,如果这有什么不同的话。如果您想使用 maven 触发分析并将结果发送到您的 SonarQube 实例,您可以使用 maven sonar 插件。
  • 我想做的是,与声纳皮棉进行持续集成

标签: java plugins maven-3 sonarlint


【解决方案1】:

SonarLint 是一个本地插件,可以嵌入到您的 IDE 中。 在插件设置中,您可以放置​​“自动触发分析”,以便在编写时获得反馈。
为了执行持续集成,您应该使用 SonarQube,可以将其与 JenkinsCodemagic 以及 Maven 集成。 也可以将 SonarQube 添加到您的拉取请求中。
您可以查看文档here

你可以找到更多关于SonarLint和SonarQube的区别here

【讨论】:

    【解决方案2】:

    Solarlint 不是 maven 插件。它是一个 IDE 插件。请在您询问下一个插件相关时指定您使用的 IDE。

    对于 Eclipse: Help> Eclipse Marketplace > (search solar lint) > install > Agree > Restart IDE and you are done!

    Intellij idea : Preferences > Plugins > (search solar lint) > Restart IDE and you are done.

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-11-11
      • 2019-12-22
      • 2020-11-25
      • 2021-08-07
      • 1970-01-01
      • 2022-09-28
      • 1970-01-01
      • 2020-07-16
      相关资源
      最近更新 更多