2016-08-09 46 views
0

我使用SonarLint來獲得更好的代碼。這是使用默認設置。我有一個包含以下條目的xml文件。如何在eclipse中使用聲納的自定義設置?

<profile> 
    <name>Sonar Way with Custom rules</name> 
    <language>java</language> 
    <rules> 
    <rule> 
    <repositoryKey>common-java</repositoryKey> 
    <key>DuplicatedBlocks</key> 
    <priority>MINOR</priority> 
    </rule> 
    <rule> 
    <repositoryKey>common-java</repositoryKey> 
    <key>InsufficientBranchCoverage</key> 
    <priority>MAJOR</priority> 
    <parameters> 
    <parameter> 
    <key>minimumBranchCoverageRatio</key> 
    <value>65.0</value> 
    </parameter> 
    </parameters> 
    </rule> 
<profile> 

我的問題是我如何使用這個xml作爲我的SonarLint自定義設置。 謝謝

回答

0

這樣做的正確方法是在SonarQube服務器中定義質量配置文件,並使用要激活的規則並將SonarLint連接到它。

有關詳細信息,請檢查您在http://www.sonarlint.org中使用的IDE的「連接模式」部分。

相關問題