我想在GitHub动作中使用cpplint安装自动检查代码。
我尝试将其安装在工作流文件中,如下所示:
- name: Install cpplint
working-directory: ${{runner.workspace}}/uast
shell: bash
run: |
pip install wheel
pip install cpplint
在此代码块之后,我尝试运行cpplint:
- name: cpplint
working-directory: ${{runner.workspace}}/uast
shell: bash
run: cpplint --recursive --exclude=source/catch.hpp --filter=-legal/copyright,-build/include_subdir source/*
但是在成功安装之后(在第一个块中),我在第二个中获得了“第1行:cpplint:找不到命令”。
请尝试python -m cpplint
:
- name: cpplint
working-directory: ${{runner.workspace}}/uast
shell: bash
run: python -m cpplint --recursive --exclude=source/catch.hpp --filter=-legal/copyright,-build/include_subdir source/*
通过pip安装的模块无法识别为系统级命令。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句