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許可證發布的