簡體   English   中英

在Sonar 5.2中無法導入質量配置文件規則集

[英]Unable to import Quality Profile Ruleset in Sonar 5.2

我從Sonar 3.7.x中備份了規則集,並想導入Sonar 5.2。 該規則集具有PMD,CheckStyle和Findbugs的規則。 當我嘗試通過GUI進行導入時,沒有任何錯誤,但是沒有任何規則被導入(0條規則)。 然后,我嘗試使用Sonar API使用curl導入規則集。 盡管結果(ruleFailures:600)顯示沒有導入XML中600條規則之外的規則(與GUI行為相同),但命令在此也成功執行。

-bash-4.1$ curl -X POST -u admin:admin -F "backup=@My_standard_java_600.xml" -v http://XX.XX.40.70:9080/api/profiles/restore
* About to connect() to XX.XX.40.70 port 9080 (#0)
* Trying XX.XX.40.70... connected
* Connected to XX.XX.40.70 (XX.XX.40.70) port 9080 (#0)
* Server auth using Basic with user 'admin'
> POST /api/profiles/restore HTTP/1.1
> Authorization: Basic YWRtaW46YWRtaW4=
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: XX.XX.40.70:9080
> Accept: */*
> Content-Length: 105883
> Expect: 100-continue
> Content-Type: multipart/form-data; boundary=----------------------------b413fb6533eb
>
< HTTP/1.1 100 Continue
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: JSESSIONID=CE9FC5FE32939BE5ECC4FC64324B238D; Path=/; HttpOnly
< X-Runtime: 16162
< ETag: "c48a79cd01c8066aa814d5755e0c29ed"
< Cache-Control: private, max-age=0, must-revalidate
< X-Frame-Options: SAMEORIGIN
< X-XSS-Protection: 1; mode=block
< X-Content-Type-Options: nosniff
< Content-Type: application/json;charset=utf-8
< Content-Length: 194
< Date: Wed, 02 Dec 2015 15:16:15 GMT
<
* Connection #0 to host XX.XX.40.70 left intact
* Closing connection #0
{"profile":{"key":"java-my-standard-63451","name":"My Standard","language":"java","isDefault":false,"isInherited":false,"languageName":"Java"},"ruleSuccesses":0,"ruleFailures":600}

我將Sonar-way Java規則導出與我的文件進行了比較,但我發現XML格式可能不會從v3.x更改為5.x。 聲納專家可以幫助解決此問題嗎?

正如G.Ann在上述評論中所指出的,該問題與新Sonar 5.2安裝中缺少的Findbugs,Checkstyle和PMD插件有關,因為不再支持開箱即用的Squid。 安裝完成后,導入工作正常,盡管Sonar的部分內容令人煩惱,但並未暗示未導入規則的真正原因。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM