Skip to content

Commit

Permalink
Update clang-format.yml
Browse files Browse the repository at this point in the history
Update clang-format version

Signed-off-by: Cervenka Dusan <cervenka@acrios.com>
  • Loading branch information
Hadatko committed Oct 18, 2023
1 parent f92951c commit b43796f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
9 changes: 9 additions & 0 deletions .clang-format-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#list of ignored files to format
./erpc_c/port/erpc_serial.cpp
./erpcgen/src/cpptemplate/cpptempl.hpp
./erpcgen/src/cpptemplate/cpptempl.cpp
./erpcgen/src/cpptemplate/cpptempl_test.cpp
./erpcgen/test/test_includes/test_includes_union.h
./test/common/gtest/gtest.h
./test/common/gtest/gtest.cpp
./test/common/retarget_cpp_streamed_io.c
9 changes: 4 additions & 5 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: DoozyX/clang-format-lint-action@v0.10
- uses: actions/checkout@v4
- uses: DoozyX/clang-format-lint-action@v0.16.2
with:
source: '.'
exclude: 'test/common/gtest/gtest.h test/common/gtest/gtest.cpp erpcgen/src/cpptemplate/cpptempl.h erpcgen/src/cpptemplate/cpptempl.cpp erpcgen/src/cpptemplate/cpptempl_test.cpp'
clangFormatVersion: 10
source: '.'
clangFormatVersion: 16
11 changes: 3 additions & 8 deletions run_clang_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,10 @@
"erpcsniffer/src",
"test"]

# Files which will be not formatted
exceptions = [
"test/common/gtest/gtest.h",
"test/common/gtest/gtest.cpp",
"erpc_c/port/erpc_serial.cpp",
"erpcgen/src/cpptemplate/cpptempl.hpp",
"erpcgen/src/cpptemplate/cpptempl.cpp",
"erpcgen/src/cpptemplate/cpptempl_test.cpp"]
with open(".clang-format-ignore") as f:
exceptionsTmp = f.read().split("\n")

exceptions = [exception for exception in exceptionsTmp if exception != "" and exception[0] != "#"]
# For windows use "\\" instead of "/" path separators.
if os.environ.get('OS', '') == 'Windows_NT':
folders = [os.path.normpath(folder) for folder in folders]
Expand Down

0 comments on commit b43796f

Please sign in to comment.