Is there a way to only upload coverage and to skip all other scanner checks

Even though we do cache directories .scannerwork and set SONAR_USER_HOME: $CI_PROJECT_DIR/.sonar (and cache it too) scanning takes about ~10-15 minutes to complete the scan, which too much, the entire pipeline with tests/lint/coverage runs for ~5 minutes, so scanner quadruples the overall time.

By looking at the report I cannot tell if cache is actually used to only analyze the delta (although it’s placed correctly and I see that it is being extracted by Gitlab). Locally I don’t see ANY performance gains (other than plugins JARs were used from cache, analysis takes same time) when I run scanner second time, looks like each time it analyzes the entire codebase, even though nothing has changed. Looks like there’s an issue for that: Incremental Analysis and Incremental scan in SonarQube 6.7.x. Nothing changed since 2018?

My question is if there is a way to make scan asynchronously (on sonar server for example, not during the pipeline)? We mostly care to upload coverage once pipeline is finished, potential bugs and other analysis is done much later.

I found a similar issue: Is it possible to upload test execution and coverage data separately from running sonar-scanner analysis?. If it is this bad we’d rather turn the analysis off, we use ESLint anyway. Is this an option?

Here’s the scan report:

INFO: Scanner configuration file: /opt/sonar-scanner-4.1.0.1829-linux/conf/sonar-scanner.properties
INFO: Project root configuration file: /builds/web/web/sonar-project.properties
INFO: SonarQube Scanner 4.1.0.1829
INFO: Java 1.8.0_202 Oracle Corporation (64-bit)
INFO: Linux 3.10.0-1062.1.1.el7.x86_64 amd64
INFO: User cache: /builds/web/web/.sonar/cache
INFO: SonarQube server 8.0.0
INFO: Default locale: "en_US", source code encoding: "UTF-8"
WARN: SonarScanner will require Java 11+ to run starting in SonarQube 8.x
INFO: Load global settings
INFO: Load global settings (done) | time=140ms
INFO: Server id: XXX
INFO: User cache: /builds/web/web/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=35ms
INFO: Load/download plugins (done) | time=70ms
INFO: Process project properties
INFO: Process project properties (done) | time=6ms
INFO: Execute project builders
INFO: Execute project builders (done) | time=3ms
INFO: Project key: serviceweb-scs
INFO: Base dir: /builds/web/web
INFO: Working dir: /builds/web/web/.scannerwork
INFO: Load project settings for component key: 'serviceweb-scs'
INFO: Load project settings for component key: 'serviceweb-scs' (done) | time=20ms
INFO: Load project branches
INFO: Load project branches (done) | time=22ms
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=37ms
INFO: Load branch configuration
INFO: Load branch configuration (done) | time=1ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=49ms
INFO: Detected Gitlab CI
INFO: Load active rules
INFO: Load active rules (done) | time=691ms
INFO: Branch name: master, type: long living
INFO: Indexing files...
INFO: Project configuration:
INFO:   Excluded sources: src/**/lang/**, src/app/configs/routeConfigs/settingsConfig/**, src/host/public/static/tap2join/**, src/RCLibX/**, src/mobile/**, src/desktop/**, **/*.spec.js, **/*.spec.ts, **/*.spec.js, **/*.spec.ts
INFO:   Included tests: **/*.spec.js, **/*.spec.ts
INFO: Load project repositories
INFO: Load project repositories (done) | time=97ms
INFO: 8006 files indexed
INFO: 0 files ignored because of inclusion/exclusion patterns
INFO: 0 files ignored because of scm ignore settings
INFO: Quality profile for css: Sonar way
INFO: Quality profile for js: Sonar way Recommended
INFO: Quality profile for ruby: Sonar way
INFO: Quality profile for ts: Sonar way recommended
INFO: Quality profile for web: Sonar way
INFO: Quality profile for xml: MyBatisLint Rules
INFO: ------------- Run sensors on module ServiceWeb RCWeb
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=17ms
INFO: Sensor SonarCSS Metrics [cssfamily]
INFO: Sensor SonarCSS Metrics [cssfamily] (done) | time=362ms
INFO: Sensor SonarCSS Rules [cssfamily]
INFO: 242 source files to be analyzed
INFO: 242/242 source files have been analyzed
INFO: Sensor SonarCSS Rules [cssfamily] (done) | time=2971ms
INFO: Sensor MyBatisLint Sensor [mybatis]
INFO: stmtIdExcludeList: []
INFO: Sensor MyBatisLint Sensor [mybatis] (done) | time=69ms
INFO: Sensor Apigee XML Sensor [xml]
INFO: 2 source files to be analyzed
INFO: Sensor Apigee XML Sensor [xml] (done) | time=116ms
INFO: 2/2 source files have been analyzed
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=160ms
INFO: Sensor XML Sensor [xml]
INFO: 2 source files to be analyzed
INFO: Sensor XML Sensor [xml] (done) | time=23ms
INFO: Sensor SonarTS [typescript]
INFO: 2/2 source files have been analyzed
INFO: Since SonarTS v2.0, TypeScript analysis is performed by SonarJS analyzer v6.0 or later. No TypeScript analysis is performed by SonarTS.
INFO: Sensor SonarTS [typescript] (done) | time=1ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=26ms
INFO: Sensor JavaScript analysis [javascript]
INFO: Using TypeScript at: '/builds/web/web/node_modules'
INFO: 2372 source files to be analyzed
ERROR: Failed to parse file [src/app/modules/transferNumber/components/common/uploadDocList/UploadDocList.js] at line 7: Unexpected character '@'
ERROR: Failed to parse file [src/app/modules/extensionSettings/components/callHandling/callQueueCallHandling/grids/FixedOrderGridItem.js] at line 13: Unexpected character '@'
INFO: 147/2372 files analyzed, current file: src/app/modules/transferNumber/components/TransferredAndVanityList.js
ERROR: Failed to parse file [src/app/modules/customRulesManagement/components/answeringRule/saveAsTemplate/SaveAsTemplatePopup.js] at line 11: Unexpected character '@'
ERROR: Failed to parse file [src/app/modules/extensionSettings/components/callHandling/overflowQueue/OverflowCallQueueGrid.js] at line 23: Unexpected character '@'
INFO: 361/2372 files analyzed, current file: src/app/modules/transferNumber/components/wizard/BaseNumberPortingWizard.js
ERROR: Failed to parse file [src/app/modules/customRulesManagement/components/answeringRule/RulePopupContainer.js] at line 30: Unexpected token =
ERROR: Failed to parse file [src/app/modules/orderNumber/confirmationStep/Confirmation.js] at line 6: Unexpected character '@'
INFO: 602/2372 files analyzed, current file: src/app/modules/extensionSettings/components/parkLocationSettings/Settings.js
ERROR: Failed to parse file [src/ringMe/src/app/makeCall/MakeCall.js] at line 27: Unexpected character '@'
ERROR: Failed to parse file [src/app/modules/hostLayout/components/columnsVisibility/ColumnsVisibilityGridItem.js] at line 11: Unexpected character '@'
INFO: 822/2372 files analyzed, current file: src/app/modules/hostLayout/components/system/EmailAsLoginIdPopup.js
ERROR: Failed to parse file [src/app/modules/meetings/components/Webinar.js] at line 11: Unexpected character '@'
ERROR: Failed to parse file [src/app/modules/SSOSettings/components/CertificateGrid.js] at line 15: Unexpected character '@'
ERROR: Failed to parse file [src/app/modules/orderNumber/contactInformationStep/ContactInformation.js] at line 8: Unexpected character '@'
ERROR: Failed to parse file [src/app/modules/extensionSettings/components/callHandling/callQueueCallHandling/grids/FixedOrderGrid.js] at line 21: Unexpected character '@'
ERROR: Failed to parse file [src/app/modules/templates/components/ApplyTemplatePopup.js] at line 59: Unexpected character '@'
ERROR: Failed to parse file [src/app/modules/userManagement/components/extensions/users/BulkApplyTemplateFlow.js] at line 10: Unexpected character '@'
INFO: 1017/2372 files analyzed, current file: src/app/modules/licensing/components/LicensesManagement.js
ERROR: Failed to parse file [src/app/modules/orderNumber/orderNumberStep/OrderForm.js] at line 8: Unexpected character '@'
ERROR: Failed to parse file [src/app/modules/ringMe/components/changeButtonStyle/ChangeButtonStyle.js] at line 9: Unexpected character '@'
ERROR: Failed to parse file [src/app/modules/extensionSettings/components/callHandling/CallForwarding.js] at line 72: Unexpected character '@'
ERROR: Failed to parse file [src/app/modules/devices/components/sharedLines/SLGLinesGrid.js] at line 30: Unexpected character '@'
INFO: 1249/2372 files analyzed, current file: src/app/modules/orderNumber/orderDetail/OrderDetail.js
ERROR: Failed to parse file [src/app/modules/orderNumber/orderDetail/OrderDetail.js] at line 33: Unexpected character '@'
ERROR: Failed to parse file [src/app/modules/hostLayout/components/columnsVisibility/ColumnsVisibilityGrid.js] at line 17: Unexpected character '@'
ERROR: Failed to parse file [src/app/modules/orderNumber/requiredDataAndDocsStep/RequiredDataAndDocs.js] at line 7: Unexpected character '@'
INFO: 1495/2372 files analyzed, current file: src/app/modules/devices/dispatchers/deviceDispatchers.js
ERROR: Failed to parse file [src/app/modules/orderNumber/OrderNumberWizard.js] at line 15: Unexpected character '@'
INFO: 1744/2372 files analyzed, current file: src/app/modules/templates/components/templateSettings/HoldMusicGreeting.js
ERROR: Failed to parse file [src/app/modules/meetings/components/LargeMeeting.js] at line 11: Unexpected character '@'
ERROR: Failed to parse file [src/app/modules/extensionSettings/components/callHandling/InternetOutageForwarding.js] at line 15: Unexpected character '@'
ERROR: Failed to parse file [src/app/modules/customRulesManagement/components/answeringRule/RuleListPopup.js] at line 42: Unexpected character '@'
INFO: 1996/2372 files analyzed, current file: src/app/modules/autoReceptionist/BL.js
ERROR: Failed to parse file [src/app/modules/ringMe/components/Settings.js] at line 35: Unexpected character '@'
ERROR: Failed to parse file [src/app/modules/extensionSettings/components/callHandling/CallForwardingGrid.js] at line 66: Unexpected character '@'
ERROR: Failed to parse file [src/app/modules/extensionSettings/components/callHandling/overflowQueue/OverflowCallQueueGridItem.js] at line 16: Unexpected character '@'
ERROR: Failed to parse file [src/app/modules/orderNumber/OrderNumber.js] at line 5: Unexpected character '@'
ERROR: Failed to parse file [src/app/modules/extensionSettings/components/callHandling/CallHandlingWaitSettingsPopup.js] at line 44: Unexpected character '@'
ERROR: Failed to parse file [src/app/modules/SSOSettings/components/CertificateGridElement.js] at line 7: Unexpected character '@'
ERROR: Failed to parse file [src/app/modules/templates/components/templates/ApplyTemplateFlow.js] at line 17: Unexpected character '@'
INFO: 2266/2372 files analyzed, current file: src/app/modules/devices/components/sharedLines/SLGOverviewPanel.js
ERROR: Failed to parse file [src/app/modules/orderNumber/orderNumberStep/OrderItemList.js] at line 8: Unexpected character '@'
INFO: 2372/2372 source files have been analyzed
INFO: Sensor SonarJS [javascript]
INFO: 2372 source files to be analyzed
INFO: 537/2372 files analyzed, current file: src/app/modules/templates/components/templateSettings/limitedExtensionTemplate/OutboundCallerID.js
INFO: 1059/2372 files analyzed, current file: src/app/modules/digitalLineWizard/models/OrderChange.js
INFO: 1412/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/userManagementConfig.js
INFO: 1412/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/userManagementConfig.js
INFO: 1412/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/userManagementConfig.js
INFO: 1412/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/userManagementConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 1504/2372 files analyzed, current file: src/app/modules/hostRouter/configs/routeConfigs/settingsConfig/getSettingsConfig.js
INFO: 2027/2372 files analyzed, current file: src/login/src/app/components/page/Upgrade.js
INFO: Sensor SonarJS [javascript] (done) | time=529509ms
INFO: Sensor JavaScript analysis [javascript] (done) | time=637915ms
INFO: 2372/2372 source files have been analyzed
INFO: Sensor SonarJS Coverage [javascript]
WARN: The use of sonar.typescript.lcov.reportPaths for coverage import is deprecated, use sonar.javascript.lcov.reportPaths instead.
INFO: Analysing [/builds/web/web/src/visualIVR/coverage/lcov.info, /builds/web/web/src/app/coverage/lcov.info, /builds/web/web/src/activityLog/coverage/lcov.info]
WARN: Could not resolve 1273 file paths in [/builds/web/web/src/visualIVR/coverage/lcov.info, /builds/web/web/src/app/coverage/lcov.info, /builds/web/web/src/activityLog/coverage/lcov.info]
WARN: First unresolved path: /builds/web/web/src/visualIVR/src/lang/loader.js (Run in DEBUG mode to get full list of unresolved paths)
INFO: Sensor SonarJS Coverage [javascript] (done) | time=383ms
INFO: Sensor TypeScript analysis [javascript]
INFO: Using /builds/web/web/tsconfig.json from sonar.typescript.tsconfigPath property
INFO: 472 source files to be analyzed
INFO: Analyzing 472 files using tsconfig: /builds/web/web/tsconfig.json
INFO: 0/472 files analyzed, current file: src/app/modules/costCenterManagement/createCostCenter/CreateCostCenterContainer.ts
INFO: 0/472 files analyzed, current file: src/app/modules/costCenterManagement/createCostCenter/CreateCostCenterContainer.ts
INFO: 116/472 files analyzed, current file: src/commonHelpers/src/locations/types.ts
INFO: 271/472 files analyzed, current file: src/app/modules/deletion/components/OrderConfirm.tsx
INFO: 386/472 files analyzed, current file: src/commonHelpers/src/common/Constants.ts
INFO: 472/472 source files have been analyzed
INFO: Sensor TypeScript analysis [javascript] (done) | time=56537ms
INFO: Sensor Ruby Sensor [ruby]
INFO: 1 source files to be analyzed
INFO: 1/1 source files have been analyzed
INFO: Sensor Ruby Sensor [ruby] (done) | time=2189ms
INFO: Sensor SimpleCov Sensor for Ruby coverage [ruby]
INFO: Sensor SimpleCov Sensor for Ruby coverage [ruby] (done) | time=0ms
INFO: ------------- Run sensors on project
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=68ms
INFO: CPD Executor 230 files had no CPD blocks
INFO: CPD Executor Calculating CPD for 2594 files
INFO: CPD Executor CPD calculation finished (done) | time=751ms
INFO: Analysis report generated in 572ms, dir size=31 MB
INFO: Analysis report compressed in 6640ms, zip size=13 MB
INFO: Analysis report uploaded in 1302ms
INFO: ANALYSIS SUCCESSFUL, you can browse https://xxx/dashboard?id=serviceweb-scs&branch=master
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 https://xxx/api/ce/task?id=AXBDCSJKNMwLaG08MOyr
INFO: Analysis total time: 12:01.493 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 12:02.431s
INFO: Final Memory: 87M/1095M
INFO: ------------------------------------------------------------------------