声纳云无法分析 ReactJS 项目

问题描述

我有一个连接到 bitbucket 管道的 ReactJS 项目。下面是管道 yml 文件

image: node:12.18.3

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

pipelines:
  branches:
      master:
      - step:
          size: 2x
          name: Build and Deploy artifacts using SCP to Test environment
          caches:
          - node
          - sonar
          script:
            #- npm install
            #- npm run build:testing
            - echo "copy files to test environment $(ls -la build/)"
            - pipe: sonarsource/sonarcloud-scan:1.2.0
              variables:
                SONAR_SCANNER_OPTS: -Xmx2048m
                SONAR_TOKEN: ${SONAR_TOKEN}
                EXTRA_ARGS: -Dsonar.host.url=https://sonarcloud.io
            # - pipe: sonarsource/sonarcloud-quality-gate:0.1.4

Sonarcloud 无法分析 JS 文件,我不知道为什么。下面是来自管道日志的最后一个跟踪,之后它抱怨内存不足错误

INFO: deploying custom rules bundle jar:file:/root/.sonar/cache/f2d4f3985cfdc8a536978941e81bc342/sonar-securityjsfrontend-plugin.jar!/js-vulnerabilities-rules-1.0.0.tgz to /opt/atlassian/pipelines/agent/build/.scannerwork/.sonartmp/eslint-bridge-bundle/package/custom-rules16697662169002208132
INFO: 698 source files to be analyzed
INFO: 0/698 files analyzed,current file: src/containers/settings/interaction/MatchingType.js
INFO: 0/698 files analyzed,current file: src/containers/settings/interaction/MatchingType.js

如果有人遇到类似问题,我们将不胜感激。谢谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)