-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Added linting github action * fix: Fix buggy c_lint.yaml * test: Bad linting * feat: Update c_lint.yaml to fail job if there are linting errors * fix: Fix buggy c_lint.yaml * fix: Add missing { to c_lint.yaml * fix: Opposite behavior in c_lint.yaml
- Loading branch information
1 parent
c15a0c8
commit 84d1573
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: C/C++ Lint Check | ||
on: [push] | ||
jobs: | ||
Lint-Check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Checking for linter errors | ||
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: '-*' # Disable clang-tidy | ||
# only 'update' a single comment in a pull request's thread. | ||
thread-comments: ${{ github.event_name == 'pull_request' && 'update' }} | ||
format-review: true | ||
passive-reviews: true | ||
- name: Fail if there are linter errors | ||
if: ${{steps.linter.outputs.clang-format-checks-failed}} | ||
run: | | ||
echo "Linter errors occurred, failing the job." | ||
exit 1 # This will cause the step to fail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters