Skip to content

Commit

Permalink
CI: add clang-format-check.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
w3ntao committed Oct 24, 2024
1 parent 781e902 commit f35e89a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: clang-format check

on:
push:
branches: [ "*" ]
pull_request:
branches: [ "*" ]
workflow_dispatch:

jobs:
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run clang-format style check for C/C++/Protobuf programs.
uses: jidicula/[email protected]
with:
clang-format-version: '16'
check-path: 'src/pbrt'
2 changes: 1 addition & 1 deletion src/pbrt/euclidean_space/bounds2.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Bounds2 {

PBRT_CPU_GPU
Bounds2(Point2<T> p1, Point2<T> p2) : p_min(p1.min(p2)), p_max(p1.max(p2)) {}

PBRT_CPU_GPU
Vector2<T> Diagonal() const {
return p_max - p_min;
Expand Down

0 comments on commit f35e89a

Please sign in to comment.