如何解决无法加载代码气候报告,但报告存在
在 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
的情况下复制/粘贴网址栏中的路径时,文件已成功下载。
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 举报,一经查实,本站将立刻删除。