Skip to content

Commit

Permalink
clang-tidy-review
Browse files Browse the repository at this point in the history
Workflow for suggesstions using clang-tidy
  • Loading branch information
psampathkumar committed Aug 2, 2022
1 parent 82c3123 commit 29f6662
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/clang-tidy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: cpp-linter
on:
pull_request:
types: [opened, reopened] # let PR-synchronize events be handled by push events
paths-ignore: "docs/**"
push:

jobs:
cpp-linter:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3

- name: Install linter python package
run: python3 -m pip install git+https://github.com/cpp-linter/cpp-linter-action@v1

- name: run linter as a python package
id: linter
# pass the installed path to the '--version' argument (Windows only).
# Any other OS-based runners only take the version number.
# Example. run: cpp-linter --version=14
# Omit the version option if using the default version available in the OS.
run: cpp-linter --version=12 --database=build/compile_commands.json

- name: Fail fast?!
if: steps.linter.outputs.checks-failed > 0
run: echo "Some files failed the linting checks!"

0 comments on commit 29f6662

Please sign in to comment.