Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create formatting-check.yml #41

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,6 @@ jobs:
# GitHub Pages directory path
ghpagesdir: ./docs

Formatting:
name: Clang Format
runs-on: ubuntu-latest
strategy:
matrix:
path:
- 'src'
- 'examples'
steps:
- uses: actions/checkout@v3
- name: Run clang-format style check for C/C++/Protobuf programs.
uses: jidicula/[email protected]
with:
clang-format-version: '14'
check-path: ${{ matrix.path }}

Linting:
name: Shellcheck
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/formatting-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Formatting check

on:
pull_request:
types:
- "opened"
- "reopened"
- "synchronize"
- "labeled"
- "unlabeled"

jobs:
formatting_check:
name: Formatting Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: clang-format style check
run: |
git clang-format-14 --diff -q origin/main | tee format_diff.txt
if [ -s format_diff.txt ]; then exit 1; fi
Loading