From 0207f6a27d6558a4130a6e51ee124cb4d9775274 Mon Sep 17 00:00:00 2001 From: Adrien GIVRY Date: Tue, 3 Feb 2026 13:07:04 -0500 Subject: [PATCH 1/3] Added clang-format and clang-tidy --- .clang-format | 9 +++++++++ .clang-tidy | 8 ++++++++ 2 files changed, 17 insertions(+) create mode 100644 .clang-format create mode 100644 .clang-tidy diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..ae5cad3 --- /dev/null +++ b/.clang-format @@ -0,0 +1,9 @@ +BasedOnStyle: WebKit +AlignAfterOpenBracket: BlockIndent +AllowShortFunctionsOnASingleLine: Empty +BinPackParameters: AlwaysOnePerLine +BreakBeforeBraces: Allman +ColumnLimit: 80 +NamespaceIndentation: All +TabWidth: 4 +UseTab: Always diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 0000000..d54eb86 --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,8 @@ +Checks: ' + -bugprone-*, + -cppcoreguidelines-*, + -clang-analyzer-* +' +WarningsAsErrors: '' +HeaderFilterRegex: '.*' +FormatStyle: file From 6288804cd4d85eeb2d84e81591e0b8e073d37e32 Mon Sep 17 00:00:00 2001 From: Adrien GIVRY Date: Tue, 3 Feb 2026 13:55:48 -0500 Subject: [PATCH 2/3] Updated clang-format to work with older versions --- .clang-format | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.clang-format b/.clang-format index ae5cad3..5e10446 100644 --- a/.clang-format +++ b/.clang-format @@ -1,7 +1,7 @@ BasedOnStyle: WebKit AlignAfterOpenBracket: BlockIndent AllowShortFunctionsOnASingleLine: Empty -BinPackParameters: AlwaysOnePerLine +BinPackParameters: true BreakBeforeBraces: Allman ColumnLimit: 80 NamespaceIndentation: All From f2c763eea9f2a62e56cbd7b910ed8b2d9c51abc9 Mon Sep 17 00:00:00 2001 From: Adrien GIVRY Date: Tue, 3 Feb 2026 14:47:03 -0500 Subject: [PATCH 3/3] Excluded deps from clang, and updated format --- .clang-format | 1 + examples/deps/.clang-format | 2 ++ examples/deps/.clang-tidy | 1 + src/baregl/detail/glad/.clang-format | 2 ++ src/baregl/detail/glad/.clang-tidy | 1 + 5 files changed, 7 insertions(+) create mode 100644 examples/deps/.clang-format create mode 100644 examples/deps/.clang-tidy create mode 100644 src/baregl/detail/glad/.clang-format create mode 100644 src/baregl/detail/glad/.clang-tidy diff --git a/.clang-format b/.clang-format index 5e10446..fd17050 100644 --- a/.clang-format +++ b/.clang-format @@ -1,5 +1,6 @@ BasedOnStyle: WebKit AlignAfterOpenBracket: BlockIndent +AllowShortCaseLabelsOnASingleLine: true AllowShortFunctionsOnASingleLine: Empty BinPackParameters: true BreakBeforeBraces: Allman diff --git a/examples/deps/.clang-format b/examples/deps/.clang-format new file mode 100644 index 0000000..9d15924 --- /dev/null +++ b/examples/deps/.clang-format @@ -0,0 +1,2 @@ +DisableFormat: true +SortIncludes: false diff --git a/examples/deps/.clang-tidy b/examples/deps/.clang-tidy new file mode 100644 index 0000000..612bd0e --- /dev/null +++ b/examples/deps/.clang-tidy @@ -0,0 +1 @@ +Checks: '-*' diff --git a/src/baregl/detail/glad/.clang-format b/src/baregl/detail/glad/.clang-format new file mode 100644 index 0000000..9d15924 --- /dev/null +++ b/src/baregl/detail/glad/.clang-format @@ -0,0 +1,2 @@ +DisableFormat: true +SortIncludes: false diff --git a/src/baregl/detail/glad/.clang-tidy b/src/baregl/detail/glad/.clang-tidy new file mode 100644 index 0000000..612bd0e --- /dev/null +++ b/src/baregl/detail/glad/.clang-tidy @@ -0,0 +1 @@ +Checks: '-*'