Below are the versions I am using -
SonarQube - 5.6.7
Scanner - sonar-scanner-3.3.0.1492-windows
SonarQube Plugin - sonar-xquery-plugin-2.0
I am testing the XQuery code using SonarQube. I created the SonarQube plugin as mentioned at link : https://github.com/malteseduck/sonar-xquery-plugin.
I added the SonarQube plugin to “sonarqube-5.6.7\extensions\plugins” folder.
When I run the scanner using “sonar-scanner” get the execution success message. Can see some of the errors are displayed as INFO in the command line logs, but cannot see the same output on SonarQube dashboard. Are only ERROR reflected in the SonarQube server are not INFO ?
Can anyone help me with what is going wrong ?
Below is the details of scanner run : -
:39:54.176 DEBUG: Initializers :
10:39:54.177 INFO: Base dir: D:\Shweta Mohite\SonarQube_Xquery_Code_Test
10:39:54.177 INFO: Working dir: D:\Shweta Mohite\SonarQube_Xquery_Code_Test.scannerwork
10:39:54.180 INFO: Source paths: xquery
10:39:54.180 INFO: Test paths: target
10:39:54.181 INFO: Source encoding: UTF-8, default locale: en_US
10:39:54.182 INFO: Index files
10:39:54.188 DEBUG: Declared extensions of language C# were converted to sonar.lang.patterns.cs : **/*.cs
10:39:54.188 DEBUG: Declared extensions of language Java were converted to sonar.lang.patterns.java : /*.java,/*.jav
10:39:54.189 DEBUG: Declared extensions of language XQuery were converted to sonar.lang.patterns.xquery : /*.xqy,/.xquery,**/.xq,/*.xqi,/.xql,**/.xqm,**/*.xqws
10:39:54.189 DEBUG: Declared extensions of language JavaScript were converted to sonar.lang.patterns.js : **/*.js
10:39:54.195 DEBUG: Language of file ‘xquery/AIAEBMResponse_ValidationModule.xquery’ is detected to be ‘xquery’
10:39:54.221 INFO: 1 files indexed
10:39:54.227 INFO: Quality profile for xquery: Default Profile
10:39:54.684 INFO: JaCoCoSensor: JaCoCo report not found : D:\Shweta Mohite\SonarQube_Xquery_Code_Test\target\jacoco.exec
10:39:54.686 INFO: JaCoCoItSensor: JaCoCo IT report not found: D:\Shweta Mohite\SonarQube_Xquery_Code_Test\target\jacoco-it.exec
10:39:54.697 DEBUG: Code colorizer, supported languages: cs,xquery
10:39:54.710 DEBUG: Sensors : Lines Sensor (wrapped) -> org.sonar.plugins.xquery.XQuerySensor@459cfcca -> XQueryTestSensor -> SCM Sensor (wrapped) -> Zero Coverage Sensor (wrapped) -> Code Colorizer Sensor (wrapped) -> CPD Block Indexer (wrapped)
10:39:54.711 INFO: Sensor Lines Sensor (wrapped)
10:39:54.724 INFO: Sensor Lines Sensor (wrapped) (done) | time=13ms
10:39:54.724 INFO: Sensor org.sonar.plugins.xquery.XQuerySensor
Mar 21, 2019 10:39:54 AM org.sonar.plugins.xquery.XQuerySensor analyse
INFO: Scanning all files to map dependencies
-
line 19: 34 - mismatched input ‘testing’ expecting ‘;’
-
line 124: 1 - no viable alternative at input '(\n\n (: Check for existence of expected EBM message. :)\n if (fn:exists($ebm)) then ()\n else\n aiaebmvalidationfn:reportIssue(“SEVERE”, “Invalid response message for InitiateBilling or FulfillBilling. Expecting ProcessFulfillmentOrderBillingResponseEBM.”, “”, “ProcessFulfillmentOrderBillingResponseEBM”),\n\n (: Check for existence, and non-empty value for mandatory elements in EBMHeader. :)\n if (fn:exists($ebmHeader) and fn:exists($ebmHeader/corecom:EBMID) and $ebmHeader/corecom:EBMID != ‘’) then ()\n else\n aiaebmvalidationfn:reportIssue(“ERROR”, “Message Header should contain Enterprise Business Message ID”, “”, “ProcessFulfillmentOrderBillingResponseEBM/EBMHeader/EBMID”),\n if (fn:exists($ebmHeader) and fn:exists($ebmHeader/corecom:RequestEBMID) and $ebmHeader/corecom:RequestEBMID != ‘’) then ()\n else\n aiaebmvalidationfn:reportIssue(“SEVERE”, “Message Header should contain Request Message ID”, “”, “ProcessFulfillmentOrderBillingResponseEBM/EBMHeader/RequestEBMID”),\n \n (: Check for existence of mandatory elements in fulfillment order header. :)\n if (fn:exists($dataArea) and fn:exists($orderHeader)) then ()\n else\n aiaebmvalidationfn:reportIssue(“ERROR”, "Response should contain Order Header ", “”, "ProcessFulfillmentOrderBillingResponseEBM/DataArea/Pro
Mar 21, 2019 10:39:55 AM org.sonar.plugins.xquery.XQuerySensor analyse
INFO: Scanning all files and gathering metrics
-
line 19: 34 - mismatched input ‘testing’ expecting ‘;’
-
line 124: 1 - no viable alternative at input '(\n\n (: Check for existence of expected EBM message. :)\n if (fn:exists($ebm)) then ()\n else\n aiaebmvalidationfn:reportIssue(“SEVERE”, “Invalid response message for InitiateBilling or FulfillBilling. Expecting ProcessFulfillmentOrderBillingResponseEBM.”, “”, “ProcessFulfillmentOrderBillingResponseEBM”),\n\n (: Check for existence, and non-empty value for mandatory elements in EBMHeader. :)\n if (fn:exists($ebmHeader) and fn:exists($ebmHeader/corecom:EBMID) and $ebmHeader/corecom:EBMID != ‘’) then ()\n else\n aiaebmvalidationfn:reportIssue(“ERROR”, “Message Header should contain Enterprise Business Message ID”, “”, “ProcessFulfillmentOrderBillingResponseEBM/EBMHeader/EBMID”),\n if (fn:exists($ebmHeader) and fn:exists($ebmHeader/corecom:RequestEBMID) and $ebmHeader/corecom:RequestEBMID != ‘’) then ()\n else\n aiaebmvalidationfn:reportIssue(“SEVERE”, “Message Header should contain Request Message ID”, “”, “ProcessFulfillmentOrderBillingResponseEBM/EBMHeader/RequestEBMID”),\n \n (: Check for existence of mandatory elements in fulfillment order header. :)\n if (fn:exists($dataArea) and fn:exists($orderHeader)) then ()\n else\n aiaebmvalidationfn:reportIssue(“ERROR”, "Response should contain Order Header ", “”, "ProcessFulfillmentOrderBillingResponseEBM/DataArea/Pro
10:39:55.983 INFO: Sensor org.sonar.plugins.xquery.XQuerySensor (done) | time=1259ms
10:39:55.984 INFO: Sensor XQueryTestSensor
10:39:55.984 INFO: parsing target\xqtest-reports
10:39:55.986 INFO: Sensor XQueryTestSensor (done) | time=2ms
10:39:55.986 INFO: Sensor SCM Sensor (wrapped)
10:39:55.986 INFO: SCM Publisher is disabled
10:39:55.987 INFO: Sensor SCM Sensor (wrapped) (done) | time=1ms
10:39:55.987 INFO: Sensor Zero Coverage Sensor (wrapped)
10:39:55.994 INFO: Sensor Zero Coverage Sensor (wrapped) (done) | time=7ms
10:39:55.995 INFO: Sensor Code Colorizer Sensor (wrapped)
10:39:56.063 INFO: Sensor Code Colorizer Sensor (wrapped) (done) | time=68ms
10:39:56.064 INFO: Sensor CPD Block Indexer (wrapped)
10:39:56.064 INFO: DefaultCpdBlockIndexer is used for xquery
10:39:56.065 DEBUG: No CpdMapping for language xquery
10:39:56.065 INFO: Sensor CPD Block Indexer (wrapped) (done) | time=1ms
10:39:56.066 INFO: Calculating CPD for 0 files
10:39:56.068 INFO: CPD calculation finished
10:39:56.147 INFO: Analysis report generated in 77ms, dir size=98 KB
10:39:56.173 INFO: Analysis reports compressed in 25ms, zip size=20 KB
10:39:56.174 INFO: Analysis report generated in D:\Shweta Mohite\SonarQube_Xquery_Code_Test.scannerwork\batch-report
10:39:56.174 DEBUG: Upload report
10:39:56.246 DEBUG: POST 200 http://localhost:9000/api/ce/submit?projectKey=my:xquerytest2&projectName=Xquery%20Test%202 | time=70ms
10:39:56.248 INFO: Analysis report uploaded in 73ms
10:39:56.249 INFO: ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard/index/my:xquerytest2
10:39:56.249 INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
10:39:56.250 INFO: More about the report processing at http://localhost:9000/api/ce/task?id=AWmf1gEoszgRyhGyqOv0
10:39:56.255 DEBUG: Report metadata written to D:\Shweta Mohite\SonarQube_Xquery_Code_Test.scannerwork\report-task.txt
10:39:56.259 DEBUG: Post-jobs :
10:39:56.329 INFO: ------------------------------------------------------------------------
10:39:56.330 INFO: EXECUTION SUCCESS
10:39:56.331 INFO: -----------------------------