微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

声纳云无法分析 ReactJS 项目

如何解决声纳云无法分析 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 举报,一经查实,本站将立刻删除。