【发布时间】:2018-05-05 07:09:59
【问题描述】:
我尝试通过阅读 Codeclimate readme docs 通过 docker 安装 Codeclimate。
为了在本地测试 Codeclimate。我新建了一个文件夹,放了hello.php和.codeclimate.yml。
以下是我的hello.php
<?php
echo("Hello");
以下是我的.codeclimate.yml
version: "2"
checks:
argument-count:
enabled: true
complex-logic:
enabled: true
file-lines:
enabled: true
method-complexity:
enabled: true
method-count:
enabled: true
method-lines:
enabled: true
nested-control-flow:
enabled: true
return-statements:
enabled: true
similar-code:
enabled: true
identical-code:
enabled: true
然后我通过我的终端像下面这样运行 codecliate
docker run \
--interactive --tty --rm \
--env CODECLIMATE_CODE="$PWD" \
--volume "$PWD":/code \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume /tmp/cc:/tmp/cc \
codeclimate/codeclimate analyze
它显示为Starting analysis 并在等待很长时间后显示。我收到超时错误。
我的配置有问题吗?
【问题讨论】:
标签: php code-climate code-climate-cli