Php SonarCloud分支没有代码行-比特桶管道-sonarsource/SonarCloud扫描

Php SonarCloud分支没有代码行-比特桶管道-sonarsource/SonarCloud扫描,php,bitbucket-pipelines,sonarcloud,Php,Bitbucket Pipelines,Sonarcloud,我正在尝试将sonarcloud与Bitbucket管道集成。我有一个简单的测试项目,只有一个名为index.php的文件,其中包含几行代码 我完全不知道我应该采取什么方法 我已经创建了sonar-project.properties文件,其中包括以下几行 sonar.sourceEncoding=UTF-8 sonar.host.url=https://sonarcloud.io/dashboard?id=first_ftp sonar.projectKey=first_ftp 这是我的ym

我正在尝试将sonarcloud与Bitbucket管道集成。我有一个简单的测试项目,只有一个名为index.php的文件,其中包含几行代码

我完全不知道我应该采取什么方法

我已经创建了sonar-project.properties文件,其中包括以下几行

sonar.sourceEncoding=UTF-8
sonar.host.url=https://sonarcloud.io/dashboard?id=first_ftp
sonar.projectKey=first_ftp
这是我的yml文件

image: aariacarterweir/lamp-gitftp:latest

clone:
  depth: full # SonarCloud scanner needs the full history to assign issues properly

definitions:
  caches:
    sonar: ~/.sonar/cache  # Caching SonarCloud artifacts will speed up your build
  steps:
    - step: &build-test-sonarcloud
        name: Build, test and analyze on SonarCloud
        caches:
          - node
          - sonar
        script:
          - npm install --quiet
          - npm run test -- --code-coverage --no-watch --no-progress --browsers=ChromeHeadlessNoSandbox  
          - pipe: sonarsource/sonarcloud-scan:0.1.5
            variables:
              SONAR_TOKEN: ${SONAR_TOKEN}
              EXTRA_ARGS: '-Dsonar.sources=src -Dsonar.tests=src -Dsonar.test.inclusions="**/testing/**,**/*.spec.ts" -Dsonar.typescript.lcov.reportPaths=coverage/lcov.info'
当我登录sonarcloud网站时,它告诉我

The main branch has no lines of code

有谁能帮助我如何使用bitbucket for php项目正确配置SonaCloud。

在bitbucket管道中运行代码分析之前,您必须首先手动运行一次分析。通过以下步骤。

我也遇到了同样的问题-在我的案例中,这是因为项目的名称-它被称为----Test,显然,默认情况下,Sonar会将其视为测试组件,并将其排除在分析之外。

是的,我已经这样做了。但我什么也得不到。我的项目目前只包含index.php,其中有几行代码缺失;和}。但是我没有收到任何错误,你确定src下有代码吗?请包括扫描仪的输出运行管道。AndroidTestAppForAzure也不工作。AndroidAppForAzure有。非常感谢。