Skip to content

Commit d7ab1eb

Browse files
committed
Update format check workflow
1 parent e62d47a commit d7ab1eb

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

.github/workflows/check-format.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,27 +40,15 @@ jobs:
4040
4141
# Check formatting for each file
4242
for file in $files; do
43-
echo "Checking formatting for file: $file"
44-
45-
# Run clang-format and capture the output
46-
output=$(clang-format -output-replacements-xml "$file")
47-
48-
# Print the output for debugging
49-
echo "clang-format output for $file:"
50-
echo "$output"
51-
52-
# Check for formatting issues
53-
if echo "$output" | grep -q '<replacement '; then
43+
if clang-format -style=file -output-replacements-xml "$file" | grep -q '<replacement '; then
5444
echo "Formatting issues found in $file"
5545
formatting_issues=1
56-
else
57-
echo "No formatting issues found in $file"
5846
fi
5947
done
6048
6149
# Exit with the appropriate status code
6250
if [ $formatting_issues -eq 1 ]; then
63-
echo "Please format the files using clang-format and commit the changes."
51+
echo "Please format the files using clang-format version "$(clang-format --version)" and commit the changes."
6452
exit 1
6553
else
6654
echo "All files are properly formatted."

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ SRC += poll/Address.cpp
1414
SRC += poll/AConnection.cpp
1515
SRC += poll/ListenSocket.cpp
1616
SRC += poll/Poll.cpp
17+
SRC += poll/IFileDescriptor.cpp
1718
SRC += poll/CallbackPointer.cpp
1819
SRC += poll/timeval.cpp
1920

src/poll/IFileDescriptor.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#include "IFileDescriptor.hpp"
2+
3+
IFileDescriptor::~IFileDescriptor() {}

0 commit comments

Comments
 (0)