SonarQube не отображает отчет об анализе XQuery на панели инструментов - PullRequest
0 голосов
/ 26 марта 2019

Я тестирую код XQuery с помощью сервера SonarQube. Я ожидаю, что отчет об анализе будет отображаться на панели инструментов SonarQube, где я смогу получить четкое представление о том, каковы проблемы / ошибки / дублирования и т. Д.

Я использую следующие инструменты: 1) SOnarQube - 5.6.7 2) Сонар-сканер - сонар-сканер-3.3.0.1492-windows 3) Плагин Sonar XQuery - 2.0 4) Использовал maven для создания плагина.

Я создал плагин сонара XQuery, как указано ниже по ссылке: https://github.com/malteseduck/sonar-xquery-plugin

Я добавил этот плагин в папку «SonarQube server 5.6 / extensions / plugins».

Изменили файл sonar-scanner.propeties, чтобы он указывал на SonrQube, используя - sonar.host.url = http://localhost:9000

Изменились свойства sonar-project.properties со следующими значениями:

sonar.projectKey = xray sonar.projectName = XQuery Unit Testing sonar.projectVersion = 2.0 sonar.sources = xquery / sonar.tests = target / sonar.language = xquery

Запустил SonarQube и запустите тест из основной папки тестирования, используя следующую команду сонарного сканера в командной строке.

Получение ниже вывода на консоль сканера -

D:\Shweta Mohite\SonarQube_Xquery_Code_Test>sonar-scanner
INFO: Scanner configuration file: D:\Shweta Mohite\sonar-scanner-3.3.0.1492-windows\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: D:\Shweta Mohite\SonarQube_Xquery_Code_Test\sonar-project.properties
INFO: SonarQube Scanner 3.3.0.1492
INFO: Java 1.8.0_121 Oracle Corporation (64-bit)
INFO: Windows Server 2008 R2 6.1 amd64
INFO: User cache: C:\Users\shweta.mohite\.sonar\cache
INFO: SonarQube server 5.6.7
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Load global repositories
INFO: Load global repositories (done) | time=286ms
INFO: User cache: C:\Users\shweta.mohite\.sonar\cache
INFO: Load plugins index
INFO: Load plugins index (done) | time=14ms
INFO: Process project properties
INFO: Load project repositories
INFO: Load project repositories (done) | time=281ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=157ms
INFO: Load active rules
INFO: Load active rules (done) | time=1003ms
INFO: Publish mode
INFO: -------------  Scan Xquery Test 2
INFO: Language is forced to xquery
INFO: Load server rules
INFO: Load server rules (done) | time=158ms
INFO: Base dir: D:\Shweta Mohite\SonarQube_Xquery_Code_Test
INFO: Working dir: D:\Shweta Mohite\SonarQube_Xquery_Code_Test\.scannerwork
INFO: Source paths: xquery
INFO: Test paths: target
INFO: Source encoding: UTF-8, default locale: en_US
INFO: Index files
INFO: 1 files indexed
INFO: Quality profile for xquery: Default Profile
INFO: JaCoCoSensor: JaCoCo report not found : D:\Shweta Mohite\SonarQube_Xquery_Code_Test\target\jacoco.exec
INFO: JaCoCoItSensor: JaCoCo IT report not found: D:\Shweta Mohite\SonarQube_Xquery_Code_Test\target\jacoco-it.exec
INFO: Sensor Lines Sensor
INFO: Sensor Lines Sensor (done) | time=47ms
INFO: Sensor org.sonar.plugins.xquery.XQuerySensor
Mar 26, 2019 10:00:04 AM org.sonar.plugins.xquery.XQuerySensor analyse
INFO: Scanning all files to map dependencies
 - line 142: 4 - no viable alternative at input '(\n    (: Check for existence of expected EBM message. :)\n    if (fn:exists($ebm)) then ()\n    else\n
 - line 139: 179 - no viable alternative at input '"ProcessFulfillmentOrderUpdateEBM")'
 - line 144: 166 - no viable alternative at input '"ProcessFulfillmentOrderUpdateEBM/EBMHeader/EBMID")'
 - line 148: 162 - no viable alternative at input '"ProcessFulfillmentOrderUpdateEBM/EBMHeader/RequestEBMID")'
 - line 153: 212 - no viable alternative at input '"ProcessFulfillmentOrderUpdateEBM/DataArea/ProcessFulfillmentOrderUpdate/Identification/BusinessCompo
 - line 156: 38 - mismatched input '(' expecting {'=', '!=', '[', '}', '*', '+', '-', ',', '/', '//', '|', '||', '!', '<', '>', '=>', 'and', 'cast', 'ca
 - line 518: 161 - no viable alternative at input '(\n        (:arathi.purohit Fix for Poison order start:)\n        for $orderLine in $orderHeader/*:Sa
estamp := fn:timezone-from-dateTime(xs:dateTime(fn:normalize-space($line/salesord:SalesOrderSchedule/salesord:PurchaseDate/text())))\n                re
 - line 347: 108 - no viable alternative at input '"Malformed Orders from Siebel")'
 - line 386: 46 - mismatched input '(' expecting {'=', '!=', '[', '}', '*', '+', '-', ',', '/', '//', '|', '||', '!', '<', '>', '=>', 'and', 'cast', 'ca
Mar 26, 2019 10:00:05 AM org.sonar.plugins.xquery.XQuerySensor analyse
INFO: Scanning all files and gathering metrics
 - line 142: 4 - no viable alternative at input '(\n    (: Check for existence of expected EBM message. :)\n    if (fn:exists($ebm)) then ()\n    else\n
 - line 139: 179 - no viable alternative at input '"ProcessFulfillmentOrderUpdateEBM")'
 - line 144: 166 - no viable alternative at input '"ProcessFulfillmentOrderUpdateEBM/EBMHeader/EBMID")'
 - line 148: 162 - no viable alternative at input '"ProcessFulfillmentOrderUpdateEBM/EBMHeader/RequestEBMID")'
 - line 153: 212 - no viable alternative at input '"ProcessFulfillmentOrderUpdateEBM/DataArea/ProcessFulfillmentOrderUpdate/Identification/BusinessCompo
 - line 156: 38 - mismatched input '(' expecting {'=', '!=', '[', '}', '*', '+', '-', ',', '/', '//', '|', '||', '!', '<', '>', '=>', 'and', 'cast', 'ca
 - line 518: 161 - no viable alternative at input '(\n        (:arathi.purohit Fix for Poison order start:)\n        for $orderLine in $orderHeader/*:Sa
estamp := fn:timezone-from-dateTime(xs:dateTime(fn:normalize-space($line/salesord:SalesOrderSchedule/salesord:PurchaseDate/text())))\n                re
 - line 347: 108 - no viable alternative at input '"Malformed Orders from Siebel")'
 - line 386: 46 - mismatched input '(' expecting {'=', '!=', '[', '}', '*', '+', '-', ',', '/', '//', '|', '||', '!', '<', '>', '=>', 'and', 'cast', 'ca
INFO: Sensor org.sonar.plugins.xquery.XQuerySensor (done) | time=1614ms
INFO: Sensor XQueryTestSensor
INFO: parsing target\xqtest-reports
INFO: Sensor XQueryTestSensor (done) | time=1ms
INFO: Sensor SCM Sensor
INFO: SCM Publisher is disabled
INFO: Sensor SCM Sensor (done) | time=0ms
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=11msa
INFO: Sensor Code Colorizer Sensor
INFO: Sensor Code Colorizer Sensor (done) | time=90ms
INFO: Sensor CPD Block Indexer
INFO: DefaultCpdBlockIndexer is used for xquery
INFO: Sensor CPD Block Indexer (done) | time=1ms
INFO: Calculating CPD for 0 files
INFO: CPD calculation finished
INFO: Analysis report generated in 92ms, dir size=92 KB
INFO: Analysis reports compressed in 25ms, zip size=18 KB
INFO: Analysis report uploaded in 154ms
INFO: ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard/index/my:xquerytest2
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at http://localhost:9000/api/ce/task?id=AWm5cVZyw2B_cH2zwsRU
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 10.135s
INFO: Final Memory: 10M/361M

Я ожидаю, что вывод будет отображаться на приборной панели SonarQube. Но результаты анализа отображаются на консоли сканера сонара как уровень INFO.

Мне нужна помощь, потому что я что-то пропустил или отчет об анализе необходимо отправить в SonarQube, выполнив некоторые настройки?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...