cpp linter action
v2.13.4
用于覆盖C/C ++代码的GITHUB操作,集成了Clang-Tidy和Clang-Format,以收集以file-annotations , thread-comments ,工作流程的形式提供的step-summary ,并进行了reacterf Request Reviews(带有tidy-review或format-review )。
警告
我们仅使用基于Debian的Linux OS(例如Ubuntu等)来支持Linux跑步者。
MacOS和Windows跑步者也得到了支持。
笔记
如果您的工作流程在容器中运行作业,则需要在Docker映像中安装Python 3.10(请参阅#185中的讨论)。我们的目的是与Ubuntu最新LTS版本中包含的默认Python版本同步。
在您的项目中创建一个新的github操作工作流程,例如.github/workflows/cpp-linter.yml
文件的内容应采用以下格式。
steps :
- uses : actions/checkout@v4
- uses : cpp-linter/cpp-linter-action@v2
id : linter
env :
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
with :
style : ' file ' # Use .clang-format config file
tidy-checks : ' ' # Use .clang-tidy config file
# only 'update' a single comment in a pull request thread.
thread-comments : ${{ github.event_name == 'pull_request' && 'update' }}
- name : Fail fast?!
if : steps.linter.outputs.checks-failed > 0
run : exit 1有关我们可用输入参数和输出变量的所有说明,请参见我们的输入和输出文档。
另请参见我们的示例食谱。
使用file-annotations :
要提供反馈(请求功能或报告错误),请发布问题。
该项目中的脚本和文档是根据MIT许可证发布的