Skip to content

Commit 6bd668a

Browse files
committed
Fix clang-tidy and clang-format issues.
1 parent 70954e6 commit 6bd668a

File tree

10 files changed

+381
-299
lines changed

10 files changed

+381
-299
lines changed

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ BreakBeforeTernaryOperators: false
3535
BreakConstructorInitializersBeforeComma: false
3636
BreakAfterJavaFieldAnnotations: false
3737
BreakStringLiterals: false
38-
ColumnLimit: 0
38+
ColumnLimit: 100
3939
CommentPragmas: '^ IWYU pragma:'
4040
ConstructorInitializerAllOnOneLineOrOnePerLine: false
4141
ConstructorInitializerIndentWidth: 8

.clang-tidy

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
Checks: >
22
*,
3-
-llvm-header-guard,
3+
-altera-id-dependent-backward-branch,
44
-altera-struct-pack-align,
5-
-readability-identifier-length,
6-
-llvmlibc-restrict-system-libc-headers,
7-
-readability-magic-numbers,
8-
-cppcoreguidelines-avoid-magic-numbers,
9-
-bugprone-easily-swappable-parameters,
10-
-hicpp-signed-bitwise,
115
-altera-unroll-loops,
6+
-bugprone-easily-swappable-parameters,
7+
-bugprone-narrowing-conversions,
8+
-cppcoreguidelines-avoid-magic-numbers,
9+
-cppcoreguidelines-init-variables,
10+
-cppcoreguidelines-narrowing-conversions,
1211
-google-readability-braces-around-statements,
1312
-hicpp-braces-around-statements,
13+
-hicpp-signed-bitwise,
14+
-llvm-header-guard,
15+
-llvmlibc-restrict-system-libc-headers,
1416
-readability-braces-around-statements,
15-
-bugprone-narrowing-conversion,
16-
-hicpp-uppercase-literal-suffix,
17-
-readability-uppercase-literal-suffix,
18-
-bugprone-narrowing-conversions,
19-
-cppcoreguidelines-narrowing-conversions,
2017
-readability-function-cognitive-complexity,
21-
-altera-id-dependent-backward-branch,
18+
-readability-identifier-length,
2219
-readability-isolate-declaration,
23-
-cppcoreguidelines-init-variables
20+
-readability-magic-numbers,
21+
-readability-math-missing-parentheses,
22+
-clang-analyzer-core.VLASize,
23+
-android-cloexec-fopen,
24+
-cert-err34-c

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
*.o
22
*.so
33
*.obj
4+
.cache/
5+
termgl_demo
6+
compile_commands.json

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021-2024 Wojciech Graj
3+
Copyright (c) 2021-2025 Wojciech Graj
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
DEMO = termgl_demo
22
SO = libtermgl.so
33
HEADER = termgl.h
4-
DEMO_SRC = termgl.c demo/termgl_demo.c
4+
DEMO_SRC = termgl.c termgl_demo.c
55
CFLAGS += -Wall
66
LDFLAGS += -lm
77

@@ -40,8 +40,8 @@ uninstall:
4040
demo: $(DEMO)
4141

4242
$(DEMO): $(DEMO_SRC)
43-
$(CC) $^ -o $@ $(CFLAGS) -DTERMGL3D -DTERMGLUTIL $(LDFLAGS)
43+
$(CC) $^ -o $@ $(CFLAGS) -DTERMGL3D -DTERMGLUTIL -D_POSIX_C_SOURCE=199309L $(LDFLAGS)
4444

4545
.PHONY: clean
4646
clean:
47-
rm -f *.so *.o *.obj
47+
rm -f *.so *.o *.obj $(DEMO)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The header file `termgl.h` contains brief documentation for all functions and st
3838

3939
### Demo
4040

41-
A demo program can be found at `demo/termgl_demo.c`.
41+
A demo program can be found at `termgl_demo.c`.
4242

4343
Available demos and TermGL features used:
4444
1. Utah Teapot\

0 commit comments

Comments
 (0)