如何解决github行动中的cpplinter
我想在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安装的模块无法识别为系统级命令。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。