Skip to content
Closed
Changes from 2 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
4 changes: 3 additions & 1 deletion chapter_1/exercise_1_02/printf_argument.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include <stdio.h>

int main(void) {
printf("hello, world\\c");
printf("hello, world\c");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix clang-format violation on the printf line

There are trailing spaces after the printf statement, which is what the C CI clang-format check is flagging. Remove them and rerun clang-format on this file.

Suggested diff:

-    printf("hello, world\c");    
+    printf("hello, world\c");
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
printf("hello, world\c");
printf("hello, world\c");
🧰 Tools
🪛 GitHub Actions: C CI

[error] 4-4: clang-format violation detected. Code should be clang-formatted [-Wclang-format-violations].

🤖 Prompt for AI Agents
In chapter_1/exercise_1_02/printf_argument.c around line 4, the printf line
contains trailing whitespace that violates the project's clang-format check;
remove the trailing spaces after the printf statement (ensure no extra spaces
after the closing semicolon) and then run clang-format on the file to apply
formatting fixes and verify the CI check passes.

return 0;
}

// prints warning: unknown escape sequence '\c'
Loading