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

无法加载代码气候报告,但报告存在

如何解决无法加载代码气候报告,但报告存在

在 gitlab 中,我有一个生成代码气候报告的管道,应该显示在 gitlab 小部件中。

报告已成功生成(我添加cat code-quality.json 但我收到消息“无法加载代码气候报告”。

当我查看 gitlab 页面的源代码时,我看到一个字符串,其中似乎包含了导致问题的代码

window.gl.mrWidgetData = { …,"codeclimate":{"head_path":"/needhelp/needhelp-web/-/jobs/123456789/artifacts/download?file_type=codequality\u0026proxy=true","base_path":"/needhelp/needhelp-web/-/jobs/987654321/artifacts/download?file_type=codequality\u0026proxy=true"},"…

当我在没有 \u0026proxy=true 的情况下复制/粘贴网址栏中的路径时,文件已成功下载。

此处是生成文件.gitlab-ci.yml 配置。

static analysis:
    stage: test
    interruptible: true
    image:
        name: $CI_QA_IMAGE
        entrypoint: [""]
    script:
        - composer install --prefer-dist --no-progress --classmap-authoritative --quiet
        - PHP bin/console --env=test cache:warmup
        - |
            ./vendor/bin/PHPstan analyze -c PHPstan.neon --no-progress --memory-limit 1G --error-format=gitlab > code-quality.json && PHPstan_error=0 || PHPstan_error=1
            if [[ -n $PHPstan_error ]]; then
                echo -e '\e[103;1mPHPstan detected errors.\e[0m'
                ls -lh code-quality.json
                cat code-quality.json
                ./vendor/bin/PHPstan analyze -c PHPstan.ci.neon --no-progress --memory-limit 1G
            else
                echo -e '\e[92;1mPHPstan detected no error with levelmax configuration.\e[0m'
            fi
        - bin/console lint:twig --env=test
        - bin/console lint:container --env=test
        - bin/console lint:xliff translations/ --env=test
    artifacts:
        when: always
        reports:
            codequality: ./code-quality.json

你知道这段代码有什么问题吗?或者如果没问题,我应该去哪里解决这个问题?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?