Skip to content

Commit ac2cbfe

Browse files
committed
Add .clang-tidy configuration and fix escape sequence in printf_argument.c
- Introduced a .clang-tidy file to define coding standards and checks for the project. - Corrected the escape sequence in printf_argument.c from '\c' to '\\c' for proper string formatting.
1 parent b51a3f0 commit ac2cbfe

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

.clang-tidy

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
Checks: >
3+
-*,
4+
bugprone-*,
5+
cert-*,
6+
clang-analyzer-*,
7+
cppcoreguidelines-*,
8+
performance-*,
9+
portability-*,
10+
readability-*,
11+
-readability-magic-numbers,
12+
-readability-identifier-length,
13+
-cppcoreguidelines-avoid-magic-numbers,
14+
-bugprone-easily-swappable-parameters,
15+
-readability-function-cognitive-complexity
16+
17+
WarningsAsErrors: ''
18+
HeaderFilterRegex: '.*'
19+
AnalyzeTemporaryDtors: false
20+
FormatStyle: 'file'
21+
User: ''
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <stdio.h>
22

33
int main(void) {
4-
printf("hello, world\c");
4+
printf("hello, world\\c");
55
return 0;
66
}

0 commit comments

Comments
 (0)