File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -20,13 +20,19 @@ jobs:
20
20
- name : Install clang-format
21
21
run : wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - && sudo apt-get install -y clang-format-18
22
22
23
+ - name : Add git safe directory
24
+ run : git config --global --add safe.directory '*'
25
+ # This command is used to address potential issues with Git's safe directory feature.
26
+ # By setting '*' as a safe directory, we allow Git operations to proceed without errors
27
+ # related to directory safety, ensuring smooth execution of the submodules updating.
28
+
23
29
- name : Run clang-format on changed files
24
30
run : |
25
31
# Get list of changed files
26
32
CHANGED_FILES=$(git diff --name-only --diff-filter=ACM master...HEAD --)
27
33
CHANGED_CPP_FILES = $(echo "$CHANGED_FILES" | grep -E '^(runtime-light|runtime-common)/.*\.(cpp|h|inl)$')
28
34
29
- # Apply clang-format to each changed file
35
+ # Apply clang-format to each changed source file
30
36
echo "$CHANGED_CPP_FILES" | xargs -r clang-format-18 -style=file -i
31
37
32
38
- name : Check for formatting changes
You can’t perform that action at this time.
0 commit comments