Code Coverage at 0% for Angular Code on Bitbucket

I have implemented SonarCloud on bitbucket and have managed to get it mostly working. However, our code coveraged is always analyzed at 0%, so it seems to not be using the test scripts (*.spec.ts) we have setup.

I have managed to get it to run properlly locally, but am unsure of what parameters I should be changing to fix this issue.

Any help is appreciated, and let me know if you would like additional information. Here is the related section of the bitbucket file

definitions:
  caches:
    sonar: ~/.sonar/cache
  services:
    docker:
      memory: 4096
  steps:
    - step: &test-step
        size: 2x
        oidc: true
        caches:
          - node
          - sonar
        name: 'Build and Test'
        script:
          - echo "Building Testing Insight Engine Front-End"
          - npx npm-check-updates --upgrade --filter "/@progress/kendo-angular.*/"
          - npm install --legacy-peer-deps @progress/kendo-svg-icons
          - export NODE_OPTIONS=--max_old_space_size=3072
          - npm install
          - npm run test-headless
          - pipe: sonarsource/sonarcloud-scan:1.4.0
            variables:
              SONAR_TOKEN: ${SONAR_TOKEN}
              EXTRA_ARGS: "-Dsonar.typescript.lcov.reportPaths=coverage/lcov.info 
              -Dsonar.coverage.exclusions=\"**/node_modules/**,**/*.spec.ts,karma.conf.js\" 
              -Dsonar.javascript.node.maxspace=4096 
              -Dsonar.typescript.node.maxspace=4096"
          - pipe: sonarsource/sonarcloud-quality-gate:0.1.6
    - step: &lint-step
        oidc: true
        name: 'Lint'
        script:
          - echo "Your linting goes here when we have some"

Hi,

Welcome to the community!

Could you provide your analysis log? I’d like to see how it’s dealing with the coverage report argument.

And BTW, the key name that’s documented is sonar.javascript.lcov.reportPaths. sonar.typescript.lcov.reportPaths has been deprecated & I’m not certain whether or not it still works. That could be why it’s not picking up your coverage report. (Yes, I know you’re coding in TypeScript and that’s why you used a key with typescript in the name. For some reason it seemed better to use 'javascript` for both languages.)

 
Ann

Thanks for the reply! Here’s the log file for SonarCloud, I have also added the ending coverage summary of the npm test. I removed -Dsonar.typescript.node.maxspace=4096 as per your recommendation, no change in results though.

=============================== Coverage summary ===============================
Statements   : 56.27% ( 942/1674 )
Branches     : 46.5% ( 113/243 )
Functions    : 46.29% ( 231/499 )
Lines        : 57.23% ( 918/1604 )
================================================================================
✔ Browser application bundle generation complete.

+ docker container run \
   --volume=/opt/atlassian/pipelines/agent/build:/opt/atlassian/pipelines/agent/build \
   --volume=/opt/atlassian/pipelines/agent/ssh:/opt/atlassian/pipelines/agent/ssh:ro \
   --volume=/usr/local/bin/docker:/usr/local/bin/docker:ro \
   --volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes \
   --volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarcloud-scan:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarcloud-scan \
   --workdir=$(pwd) \
   --label=org.bitbucket.pipelines.system=true \
   --env=BITBUCKET_STEP_TRIGGERER_UUID="$BITBUCKET_STEP_TRIGGERER_UUID" \
   --env=BITBUCKET_REPO_FULL_NAME="$BITBUCKET_REPO_FULL_NAME" \
   --env=BITBUCKET_GIT_HTTP_ORIGIN="$BITBUCKET_GIT_HTTP_ORIGIN" \
   --env=BITBUCKET_PROJECT_UUID="$BITBUCKET_PROJECT_UUID" \
   --env=BITBUCKET_REPO_IS_PRIVATE="$BITBUCKET_REPO_IS_PRIVATE" \
   --env=BITBUCKET_WORKSPACE="$BITBUCKET_WORKSPACE" \
   --env=BITBUCKET_SSH_KEY_FILE="$BITBUCKET_SSH_KEY_FILE" \
   --env=BITBUCKET_REPO_OWNER_UUID="$BITBUCKET_REPO_OWNER_UUID" \
   --env=BITBUCKET_BRANCH="$BITBUCKET_BRANCH" \
   --env=BITBUCKET_REPO_UUID="$BITBUCKET_REPO_UUID" \
   --env=BITBUCKET_PROJECT_KEY="$BITBUCKET_PROJECT_KEY" \
   --env=BITBUCKET_PARALLEL_STEP_COUNT="$BITBUCKET_PARALLEL_STEP_COUNT" \
   --env=BITBUCKET_REPO_SLUG="$BITBUCKET_REPO_SLUG" \
   --env=CI="$CI" \
   --env=BITBUCKET_REPO_OWNER="$BITBUCKET_REPO_OWNER" \
   --env=BITBUCKET_PARALLEL_STEP="$BITBUCKET_PARALLEL_STEP" \
   --env=BITBUCKET_STEP_RUN_NUMBER="$BITBUCKET_STEP_RUN_NUMBER" \
   --env=BITBUCKET_BUILD_NUMBER="$BITBUCKET_BUILD_NUMBER" \
   --env=BITBUCKET_GIT_SSH_ORIGIN="$BITBUCKET_GIT_SSH_ORIGIN" \
   --env=BITBUCKET_PIPELINE_UUID="$BITBUCKET_PIPELINE_UUID" \
   --env=BITBUCKET_COMMIT="$BITBUCKET_COMMIT" \
   --env=BITBUCKET_CLONE_DIR="$BITBUCKET_CLONE_DIR" \
   --env=PIPELINES_JWT_TOKEN="$PIPELINES_JWT_TOKEN" \
   --env=BITBUCKET_STEP_UUID="$BITBUCKET_STEP_UUID" \
   --env=BITBUCKET_STEP_OIDC_TOKEN="$BITBUCKET_STEP_OIDC_TOKEN" \
   --env=BITBUCKET_DOCKER_HOST_INTERNAL="$BITBUCKET_DOCKER_HOST_INTERNAL" \
   --env=DOCKER_HOST="tcp://host.docker.internal:2375" \
   --env=BITBUCKET_PIPE_SHARED_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes" \
   --env=BITBUCKET_PIPE_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarcloud-scan" \
   --env=EXTRA_ARGS="-Dsonar.typescript.lcov.reportPaths=coverage/lcov.info -Dsonar.coverage.exclusions=\"**/node_modules/**,**/*.spec.ts,karma.conf.js\" -Dsonar.javascript.node.maxspace=4096" \
   --env=SONAR_TOKEN="${SONAR_TOKEN}" \
   --add-host="host.docker.internal:$BITBUCKET_DOCKER_HOST_INTERNAL" \
   sonarsource/sonarcloud-scan:1.4.0
Unable to find image 'sonarsource/sonarcloud-scan:1.4.0' locally
1.4.0: Pulling from sonarsource/sonarcloud-scan
743f2d6c1f65: Pulling fs layer
5c14188d0980: Pulling fs layer
84a54a21b0f2: Pulling fs layer
d9d1bc98b287: Pulling fs layer
c99e982badff: Pulling fs layer
50c6b4dfde57: Pulling fs layer
a561eaec2f8f: Pulling fs layer
ea88b09234a3: Pulling fs layer
83613aeae58d: Pulling fs layer
5d476eee175a: Pulling fs layer
3d3951d29cc9: Pulling fs layer
a561eaec2f8f: Waiting
ea88b09234a3: Waiting
83613aeae58d: Waiting
5d476eee175a: Waiting
3d3951d29cc9: Waiting
d9d1bc98b287: Waiting
c99e982badff: Waiting
50c6b4dfde57: Waiting
84a54a21b0f2: Verifying Checksum
84a54a21b0f2: Download complete
743f2d6c1f65: Download complete
d9d1bc98b287: Verifying Checksum
c99e982badff: Verifying Checksum
c99e982badff: Download complete
ea88b09234a3: Verifying Checksum
ea88b09234a3: Download complete
a561eaec2f8f: Verifying Checksum
a561eaec2f8f: Download complete
5d476eee175a: Verifying Checksum
5d476eee175a: Download complete
743f2d6c1f65: Pull complete
50c6b4dfde57: Verifying Checksum
50c6b4dfde57: Download complete
5c14188d0980: Pull complete
3d3951d29cc9: Verifying Checksum
3d3951d29cc9: Download complete
84a54a21b0f2: Pull complete
d9d1bc98b287: Pull complete
83613aeae58d: Verifying Checksum
83613aeae58d: Download complete
c99e982badff: Pull complete
50c6b4dfde57: Pull complete
a561eaec2f8f: Pull complete
ea88b09234a3: Pull complete
83613aeae58d: Pull complete
5d476eee175a: Pull complete
3d3951d29cc9: Pull complete
Digest: sha256:8b3690666e34b17bbab84370e569151742f06f21575fbe05e5c066c160b7c968
Status: Downloaded newer image for sonarsource/sonarcloud-scan:1.4.0
INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 4.6.2.2472
INFO: Java 11.0.3 Oracle Corporation (64-bit)
INFO: Linux 5.15.0-1022-aws amd64
INFO: Bitbucket Cloud Pipelines detected, no host variable set. Defaulting to sonarcloud.io.
INFO: User cache: /root/.sonar/cache
INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: Analyzing on SonarQube server 8.0.0.34856
INFO: Default locale: "en", source code encoding: "UTF-8" (analysis is platform dependent)
INFO: Load global settings
INFO: Load global settings (done) | time=604ms
INFO: Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
INFO: User cache: /root/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=580ms
INFO: Load/download plugins (done) | time=4483ms
INFO: Loaded core extensions: developer-scanner
INFO: Found an active CI vendor: 'Bitbucket Pipelines'
INFO: Detected project key 'saleschoice_ie-angular-framework' from 'Bitbucket Cloud Pipelines'
INFO: Detected organization key 'saleschoice' from 'Bitbucket Cloud Pipelines'
INFO: Load project settings for component key: 'saleschoice_ie-angular-framework'
INFO: Load project settings for component key: 'saleschoice_ie-angular-framework' (done) | time=537ms
INFO: Process project properties
INFO: Execute project builders
INFO: Execute project builders (done) | time=1ms
INFO: Project key: saleschoice_ie-angular-framework
INFO: Base dir: /opt/atlassian/pipelines/agent/build
INFO: Working dir: /opt/atlassian/pipelines/agent/build/.scannerwork
INFO: Load project branches
INFO: Load project branches (done) | time=544ms
INFO: Check ALM binding of project 'saleschoice_ie-angular-framework'
INFO: Detected project binding: BOUND
INFO: Check ALM binding of project 'saleschoice_ie-angular-framework' (done) | time=523ms
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=519ms
INFO: Load branch configuration
INFO: Detected analysis for branch 'devops/sonarcloudfinishsetup'
INFO: Auto-configuring branch devops/sonarcloudfinishsetup
INFO: Load branch configuration (done) | time=3ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=590ms
INFO: Load active rules
INFO: Load active rules (done) | time=5434ms
INFO: Organization key: saleschoice
INFO: Branch name: devops/sonarcloudfinishsetup, type: short-lived
INFO: Load project repositories
INFO: Load project repositories (done) | time=550ms
INFO: SCM collecting changed files in the branch
INFO: SCM collecting changed files in the branch (done) | time=377ms
INFO: Indexing files...
INFO: Project configuration:
INFO:   Excluded sources: **/build-wrapper-dump.json
INFO:   Excluded sources for coverage: **/node_modules/**, **/*.spec.ts, https://bitbucket.org/saleschoice/ie-angular-framework/src/94374ef3fba0c116944a65e920d284fbe7ae4e68/karma.conf.js
INFO: 2 files indexed...  (last one was karma.conf.js)
INFO: 423 files indexed
INFO: 0 files ignored because of inclusion/exclusion patterns
INFO: 63970 files ignored because of scm ignore settings
INFO: Quality profile for css: Sonar way
INFO: Quality profile for js: Sonar way
INFO: Quality profile for json: Sonar way
INFO: Quality profile for py: Sonar way
INFO: Quality profile for ts: Sonar way
INFO: Quality profile for web: Sonar way
INFO: Quality profile for xml: Sonar way
INFO: Quality profile for yaml: Sonar way
INFO: ------------- Run sensors on module saleschoice_ie-angular-framework
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=567ms
INFO: Sensor IaC CloudFormation Sensor [iac]
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Sensor IaC CloudFormation Sensor [iac] (done) | time=221ms
INFO: Sensor IaC Kubernetes Sensor [iac]
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Sensor IaC Kubernetes Sensor [iac] (done) | time=211ms
INFO: Sensor C# Project Type Information [csharp]
INFO: Sensor C# Project Type Information [csharp] (done) | time=3ms
INFO: Sensor C# Analysis Log [csharp]
INFO: Sensor C# Analysis Log [csharp] (done) | time=21ms
INFO: Sensor C# Properties [csharp]
INFO: Sensor C# Properties [csharp] (done) | time=0ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=379ms
INFO: Sensor XML Sensor [xml]
INFO: 2 source files to be analyzed
INFO: 2/2 source files have been analyzed
INFO: Sensor XML Sensor [xml] (done) | time=157ms
INFO: Sensor Text Sensor [text]
INFO: 413 source files to be analyzed
INFO: 413/413 source files have been analyzed
INFO: Sensor Text Sensor [text] (done) | time=115ms
INFO: Sensor VB.NET Project Type Information [vbnet]
INFO: Sensor VB.NET Project Type Information [vbnet] (done) | time=1ms
INFO: Sensor VB.NET Analysis Log [vbnet]
INFO: Sensor VB.NET Analysis Log [vbnet] (done) | time=13ms
INFO: Sensor VB.NET Properties [vbnet]
INFO: Sensor VB.NET Properties [vbnet] (done) | time=0ms
INFO: Sensor Python Sensor [python]
WARN: Your code is analyzed as compatible with python 2 and 3 by default. This will prevent the detection of issues specific to python 2 or python 3. You can get a more precise analysis by setting a python version in your configuration via the parameter "sonar.python.version"
INFO: Starting global symbols computation
INFO: 1 source file to be analyzed
INFO: 1/1 source file has been analyzed
INFO: Starting rules execution
INFO: 1 source file to be analyzed
INFO: 1/1 source file has been analyzed
INFO: Sensor Python Sensor [python] (done) | time=1346ms
INFO: Sensor Cobertura Sensor for Python coverage [python]
INFO: Sensor Cobertura Sensor for Python coverage [python] (done) | time=689ms
INFO: Sensor PythonXUnitSensor [python]
INFO: Sensor PythonXUnitSensor [python] (done) | time=661ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=5ms
INFO: Sensor JavaScript analysis [javascript]
INFO: 1 source file to be analyzed
INFO: 1/1 source file has been analyzed
INFO: Hit the cache for 0 out of 1
INFO: Miss the cache for 1 out of 1: ANALYSIS_MODE_INELIGIBLE [1/1]
INFO: Sensor JavaScript analysis [javascript] (done) | time=5466ms
INFO: Sensor TypeScript analysis [javascript]
INFO: Found 1 https://bitbucket.org/saleschoice/ie-angular-framework/src/94374ef3fba0c116944a65e920d284fbe7ae4e68/tsconfig.json file(s): [/opt/atlassian/pipelines/agent/build/tsconfig.json]
INFO: 307 source files to be analyzed
INFO: Creating TypeScript program
INFO: TypeScript configuration file /opt/atlassian/pipelines/agent/build/tsconfig.json
INFO: Creating TypeScript program (done) | time=2959ms
INFO: Starting analysis with current program
INFO: 167/307 files analyzed, current file: /opt/atlassian/pipelines/agent/build/src/app/store/root-store.module.ts
INFO: 301/307 files analyzed, current file: /opt/atlassian/pipelines/agent/build/src/app/store/client-store/effects.spec.ts
INFO: Analyzed 307 file(s) with current program
INFO: 307/307 source files have been analyzed
INFO: Hit the cache for 0 out of 307
INFO: Miss the cache for 307 out of 307: ANALYSIS_MODE_INELIGIBLE [307/307]
INFO: Sensor TypeScript analysis [javascript] (done) | time=20657ms
INFO: Sensor JavaScript inside YAML analysis [javascript]
INFO: No input files found for analysis
INFO: Hit the cache for 0 out of 0
INFO: Miss the cache for 0 out of 0
INFO: Sensor JavaScript inside YAML analysis [javascript] (done) | time=2ms
INFO: Sensor JavaScript/TypeScript Coverage [javascript]
INFO: No LCOV files were found using coverage/lcov.info
WARN: No coverage information will be saved because all LCOV files cannot be found.
INFO: Sensor JavaScript/TypeScript Coverage [javascript] (done) | time=867ms
INFO: Sensor CSS Metrics [javascript]
INFO: Sensor CSS Metrics [javascript] (done) | time=71ms
INFO: Sensor CSS Rules [javascript]
INFO: 95 source files to be analyzed
INFO: 95/95 source files have been analyzed
INFO: Hit the cache for 0 out of 0
INFO: Miss the cache for 0 out of 0
INFO: Sensor CSS Rules [javascript] (done) | time=2534ms
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend]
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend] (done) | time=3ms
INFO: Sensor Python HTML templates processing [securitypythonfrontend]
INFO: Found no 'settings.py' files in the project. We will consider 'autoescape' project option enabled.
INFO: Sensor Python HTML templates processing [securitypythonfrontend] (done) | time=56ms
INFO: Sensor Serverless configuration file sensor [security]
INFO: 0 Serverless function entries were found in the project
INFO: 0 Serverless function handlers were kept as entrypoints
INFO: Sensor Serverless configuration file sensor [security] (done) | time=5ms
INFO: Sensor AWS SAM template file sensor [security]
INFO: Sensor AWS SAM template file sensor [security] (done) | time=2ms
INFO: Sensor AWS SAM Inline template file sensor [security]
INFO: Sensor AWS SAM Inline template file sensor [security] (done) | time=1ms
INFO: Sensor javabugs [dbd]
INFO: Reading IR files from: /opt/atlassian/pipelines/agent/build/.scannerwork/ir/java
INFO: No IR files have been included for analysis.
INFO: Sensor javabugs [dbd] (done) | time=2ms
INFO: Sensor pythonbugs [dbd]
INFO: Reading IR files from: /opt/atlassian/pipelines/agent/build/.scannerwork/ir/python
INFO: Analyzing 2 functions to detect bugs.
INFO: Sensor pythonbugs [dbd] (done) | time=95ms
INFO: Sensor JavaSecuritySensor [security]
INFO: Reading type hierarchy from: /opt/atlassian/pipelines/agent/build/.scannerwork/ucfg2/java
INFO: Read 0 type definitions
INFO: Reading UCFGs from: /opt/atlassian/pipelines/agent/build/.scannerwork/ucfg2/java
INFO: No UCFGs have been included for analysis.
INFO: Sensor JavaSecuritySensor [security] (done) | time=4ms
INFO: Sensor CSharpSecuritySensor [security]
INFO: Reading type hierarchy from: /opt/atlassian/pipelines/agent/build/ucfg_cs2
INFO: Read 0 type definitions
INFO: Reading UCFGs from: /opt/atlassian/pipelines/agent/build/ucfg_cs2
INFO: No UCFGs have been included for analysis.
INFO: Sensor CSharpSecuritySensor [security] (done) | time=0ms
INFO: Sensor PhpSecuritySensor [security]
INFO: Reading type hierarchy from: /opt/atlassian/pipelines/agent/build/.scannerwork/ucfg2/php
INFO: Read 0 type definitions
INFO: Reading UCFGs from: /opt/atlassian/pipelines/agent/build/.scannerwork/ucfg2/php
INFO: No UCFGs have been included for analysis.
INFO: Sensor PhpSecuritySensor [security] (done) | time=1ms
INFO: Sensor PythonSecuritySensor [security]
INFO: Reading type hierarchy from: /opt/atlassian/pipelines/agent/build/.scannerwork/ucfg2/python
INFO: Read 268 type definitions
INFO: Reading UCFGs from: /opt/atlassian/pipelines/agent/build/.scannerwork/ucfg2/python
INFO: 17:23:52.074534 Building Runtime Type propagation graph
INFO: 17:23:52.096727 Running Tarjan on 2936 nodes
INFO: 17:23:52.107729 Tarjan found 2936 components
INFO: 17:23:52.122786 Variable type analysis: done
INFO: 17:23:52.125009 Building Runtime Type propagation graph
INFO: 17:23:52.133868 Running Tarjan on 2877 nodes
INFO: 17:23:52.137652 Tarjan found 2877 components
INFO: 17:23:52.14487 Variable type analysis: done
INFO: Analyzing 1343 ucfgs to detect vulnerabilities.
INFO: All rules entrypoints : 0
INFO: Retained UCFGs : 0
INFO: Taint analysis starting. Entrypoints: 0
INFO: Taint analysis: done.
INFO: Sensor PythonSecuritySensor [security] (done) | time=564ms
INFO: Sensor JsSecuritySensor [security]
INFO: Reading type hierarchy from: /opt/atlassian/pipelines/agent/build/.scannerwork/ucfg2/js
INFO: Read 0 type definitions
INFO: Reading UCFGs from: /opt/atlassian/pipelines/agent/build/.scannerwork/ucfg2/js
INFO: 17:23:52.948171 Building Runtime Type propagation graph
INFO: 17:23:53.03389 Running Tarjan on 8410 nodes
INFO: 17:23:53.047784 Tarjan found 8410 components
INFO: 17:23:53.071367 Variable type analysis: done
INFO: 17:23:53.071547 Building Runtime Type propagation graph
INFO: 17:23:53.157022 Running Tarjan on 8410 nodes
INFO: 17:23:53.166101 Tarjan found 8410 components
INFO: 17:23:53.186075 Variable type analysis: done
INFO: Analyzing 1504 ucfgs to detect vulnerabilities.
INFO: Taint analysis starting. Entrypoints: 309
INFO: Running symbolic analysis for 'JS'
INFO: Taint analysis: done.
INFO: Sensor JsSecuritySensor [security] (done) | time=8754ms
INFO: ------------- Run sensors on project
INFO: Sensor Analysis Warnings import [csharp]
INFO: Sensor Analysis Warnings import [csharp] (done) | time=0ms
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=21ms
INFO: SCM Publisher SCM provider for this project is: git
INFO: SCM Publisher 144 source files to be analyzed
INFO: Blaming files using jgit implementation
INFO: Blaming files using jgit implementation (done) | time=1926ms
INFO: SCM Publisher 142/144 source files have been analyzed (done) | time=1942ms
WARN: Missing blame information for the following files:
WARN:   * https://bitbucket.org/saleschoice/ie-angular-framework/src/94374ef3fba0c116944a65e920d284fbe7ae4e68/package-lock.json
WARN:   * https://bitbucket.org/saleschoice/ie-angular-framework/src/94374ef3fba0c116944a65e920d284fbe7ae4e68/package.json
WARN: This may lead to missing/broken features in SonarCloud
INFO: CPD Executor 96 files had no CPD blocks
INFO: CPD Executor Calculating CPD for 261 files
WARN: Too many duplication groups on file src/app/components/dashboard/team/teamData.ts. Keep only the first 100 groups.
INFO: CPD Executor CPD calculation finished (done) | time=217ms
INFO: SCM writing changed lines
WARN: File '/opt/atlassian/pipelines/agent/build/src/app/components/shared/abstract-destructible-component/abstract-destructible.component.ts' was detected as changed but without having changed lines
WARN: File '/opt/atlassian/pipelines/agent/build/src/app/components/dashboard/team/team-total/team-total.component.html' was detected as changed but without having changed lines
INFO: SCM writing changed lines (done) | time=752ms
INFO: Analysis report generated in 1006ms, dir size=2 MB
INFO: Analysis report compressed in 625ms, zip size=965 KB
INFO: Analysis report uploaded in 1238ms
INFO: ANALYSIS SUCCESSFUL, you can find the results at: https://sonarcloud.io/dashboard?id=saleschoice_ie-angular-framework&branch=devops%2Fsonarcloudfinishsetup&resolved=false
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://sonarcloud.io/api/ce/task?id=AYSgXk9qHhiZB6OdvSW5
INFO: Analysis total time: 1:23.733 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 1:35.115s
INFO: Final Memory: 153M/540M
INFO: ------------------------------------------------------------------------
e[32m✔ SonarCloud analysis was successful.e[0m

Could this be the issue? I thought -Dsonar.typescript.lcov.reportPaths=coverage/lcov.info handled that, but I might have something wrong.

INFO: No LCOV files were found using coverage/lcov.info
WARN: No coverage information will be saved because all LCOV files cannot be found.
INFO: Sensor JavaScript/TypeScript Coverage [javascript] (done) | time=867ms

Hi,

Yes, you’ve spotted the problem. Are you actually generating an lcov.info file? Into the coverage directory?

 
Ann

I was just looking into that, and it was two problems actually,

The karma.conf file was missing this line, must have gotten removed in a merge accidentally

  reporters: [ { type: 'lcov'} ]

But also, my path ‘coverage/lcov.info’ was wrong, so fixed that and we are working properly now.

Thanks for your help!