Skip to content

No trailing return type cpp-linter suggestions #16

No trailing return type cpp-linter suggestions

No trailing return type cpp-linter suggestions #16

Workflow file for this run

name: cpp-linter
on:
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
cpp-linter:
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set Flags
run: export USE_CUDA=0
- name: Install Protobuf
run: sudo apt install protobuf-compiler
- name: Install Python dependencies
uses: py-actions/py-dependency-install@v4
with:
path: "PyTorch_requirements.txt"
- name: Configure CMake
# Configure CMake so we can get a compile_commands.json so that clang-tidy won't be angry about missing headers any more
run: cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_PREFIX_PATH=`python3 -c 'import torch;print(torch.utils.cmake_prefix_path)'` -B ${{github.workspace}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- uses: cpp-linter/cpp-linter-action@main
id: linter
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
style: "Microsoft"
ignore: '.github|_deps|CMakeFiles'
format-review: true
tidy-review: true
files-changed-only: false
thread-comments: true
tidy-checks: 'boost-*,bugprone-*,performance-*,readability-*,portability-*,modernize-*,clang-analyzer-*,cppcoreguidelines-*,-modernize-use-trailing-return-type'
- name: Fail fast?!
if: steps.linter.outputs.checks-failed != 0
run: |
echo "some linter checks failed. ${{ steps.linter.outputs.checks-failed }}"
# for actual deployment
# run: exit 1