I'm getting totally Clean Report, which should not be the case

I’m using Bitbucket Pipelines, I’m not getting any errors but always the reports are clean which should not be the case. Code is based on React/TypeScript.
In logs of bitbucket pipeline, I can see following logs
INFO: Preprocessing files...
INFO: 0 languages detected in 0 preprocessed files
INFO: 0 files ignored because of inclusion/exclusion patterns
0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Sensor Java Config Sensor [iac] (done) | time=36ms
INFO: Sensor IaC Docker Sensor [iac]
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed

Branch is getting detected by SonarCloud but reports are clean and Pass.

Using - sonarsource/sonarcloud-scan:2.0.0

Hey there.

Can you share your complete Bitbucket Pipelines YML?

Hi @Colin,

Here is my YML

image: node:18.16.1
clone:
  depth: full # SonarCloud scanner needs the full history to assign issues properly
pipelines:
  default:
    - step:
        name: Build and test
        script:
          - rm -rf package-lock.json
          - rm -rf yarn.lock
          - rm -rf node_modules
          - yarn
  custom:
    deployToSonarSource:
      - step:
          caches:
            - node
          name: SonarSource
          deployment: uat
          size: 2x # Double resources available for this step.
          script:
            - rm -rf package-lock.json
            - rm -rf yarn.lock
            - rm -rf node_modules
            - yarn
            - CI='' yarn build:xx
            - cd build
            - pipe: sonarsource/sonarcloud-scan:2.0.0

I don’t quite understand what’s going on there. If I can suggest something more simple based on the analysis tutorial in the SonarCloud UI:

image: node:18.16.1

clone:
  depth: full

definitions:
  caches:
    sonar: ~/.sonar/cache
  steps:
    - step: &build-test-sonarcloud
        name: Build, test and analyze on SonarCloud
        caches:
          - sonar
        script:
          - rm -rf package-lock.json
          - rm -rf yarn.lock
          - rm -rf node_modules
          - yarn
          - pipe: sonarsource/sonarcloud-scan:2.0.0

pipelines:
  branches:
    master:
      - step: *build-test-sonarcloud
  pull-requests:
    '**':
      - step: *build-test-sonarcloud