Skip to content

Commit 1181d74

Browse files
committed
Prototype clang-format support
1 parent 7a45c4e commit 1181d74

File tree

1,298 files changed

+28219
-35163
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,298 files changed

+28219
-35163
lines changed

.clang-format

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright 2024 The Khronos Group Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
---
4+
# Use defaults from the Google style with the following exceptions:
5+
Language: Cpp
6+
BasedOnStyle: Google
7+
IndentWidth: 4
8+
IndentCaseLabels: false
9+
AccessModifierOffset: -2
10+
ColumnLimit: 132
11+
SortIncludes: false
12+
...

.github/workflows/formatting.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Copyright 2024 The Khronos Group Inc.
2+
# Copyright 2024 RasterGrid Kft.
3+
# SPDX-License-Identifier: Apache-2.0
4+
name: Formatting
5+
6+
on:
7+
# Trigger the workflow on a pull request,
8+
pull_request:
9+
10+
push:
11+
# And on pushes to main, which will occur when a PR is merged.
12+
branches:
13+
- main
14+
# Also trigger on push of release tags to any branch. Useful
15+
# for testing release builds before merging to main.
16+
tags:
17+
- 'v[0-9]+.[0-9]+.[0-9]+'
18+
- 'v[0-9]+.[0-9]+.[0-9]+-*'
19+
paths-ignore:
20+
- .appveyor.yml
21+
- .travis.yml
22+
23+
permissions:
24+
contents: read
25+
26+
jobs:
27+
clang-format:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v4
31+
- name: Run clang-format
32+
uses: jidicula/[email protected]
33+
with:
34+
clang-format-version: '14'
35+
36+
clang-tidy:
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v4
40+
- name: Run clang-tidy
41+
uses: HorstBaerbel/[email protected]

.gitignore

+6-7
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,12 @@
1313
# /include/
1414
/include/imdebug.h
1515

16-
# /lib/
17-
/lib/astc-encoder/.gitmodules
18-
/lib/astc-encoder/Source/GoogleTest
19-
/lib/basisu/bin_osx
20-
/lib/basisu/bin
21-
/lib/basisu/build
22-
/lib/src
16+
# /external/
17+
/external/astc-encoder/.gitmodules
18+
/external/astc-encoder/Source/GoogleTest
19+
/external/basisu/bin_osx
20+
/external/basisu/bin
21+
/external/basisu/build
2322

2423
# /testimages/
2524
/testimages/*.png

.reuse/dep5

+12-12
Original file line numberDiff line numberDiff line change
@@ -70,48 +70,48 @@ Files: */*.json
7070
Copyright: 2017-2020 Mark Callow
7171
License: Apache-2.0
7272

73-
Files: lib/astc-encoder/Docs/* lib/astc-encoder/Test/* lib/astc-encoder/jenkins/* lib/astc-encoder/.gitattributes lib/astc-encoder/.gitignore lib/astc-encoder/.gitmodules lib/astc-encoder/.pylintrc lib/astc-encoder/README.md lib/astc-encoder/Utils/Example/README.md
73+
Files: external/astc-encoder/Docs/* external/astc-encoder/Test/* external/astc-encoder/jenkins/* external/astc-encoder/.gitattributes external/astc-encoder/.gitignore external/astc-encoder/.gitmodules external/astc-encoder/.pylintrc external/astc-encoder/README.md external/astc-encoder/Utils/Example/README.md
7474
Copyright: 2020-2021 Arm Limited
7575
License: Apache-2.0
7676

77-
Files: lib/astc-encoder/.gitrepo
77+
Files: external/astc-encoder/.gitrepo
7878
Copyright: 2021 Mark Callow
7979
License: Apache-2.0
8080

81-
Files: lib/astc-encoder/Source/stb_image*.h
81+
Files: external/astc-encoder/Source/stb_image*.h
8282
Copyright: 2017 Sean Barrett
8383
License: MIT
8484

85-
Files: lib/astc-encoder/Source/tinyexr.h
85+
Files: external/astc-encoder/Source/tinyexr.h
8686
Copyright: 2014-2019 Syoyo Fujita and many contributors
8787
License: BSD-3-Clause
8888

89-
Files: lib/astc-encoder/Source/wuffs-v0.3.c
89+
Files: external/astc-encoder/Source/wuffs-v0.3.c
9090
Copyright: 2022 The Wuffs Authors.
9191
License: Apache-2.0
9292

9393
# We have asked Binomial about REUSE compliance for their repo, see https://github.com/BinomialLLC/basis_universal/issues/165
94-
Files: lib/basisu/*
94+
Files: external/basisu/*
9595
Copyright: 2019-2020 Binomial LLC
9696
License: Apache-2.0
9797

98-
Files: lib/basisu/apg_bmp.* lib/basisu/CMakeLists.txt lib/basisu/webgl/transcoder/CMakeLists.txt
98+
Files: external/basisu/apg_bmp.* external/basisu/CMakeLists.txt external/basisu/webgl/transcoder/CMakeLists.txt
9999
Copyright: 2019 Anton Gerdelan
100100
License: Apache-2.0
101101

102-
Files: lib/basisu/basisu_astc_decomp.*
102+
Files: external/basisu/basisu_astc_decomp.*
103103
Copyright: 2016 The Android Open Source Project
104104
License: Apache-2.0
105105

106106
Files: tools/imageio/png.imageio/lodepng.*
107107
Copyright: 2005-2019 Lode Vandevenne
108108
License: Zlib
109109

110-
Files: lib/dfdutils/vulkan/*
110+
Files: external/dfdutils/vulkan/*
111111
Copyright: 2015-2020 The Khronos Group Inc.
112112
License: Apache-2.0
113113

114-
Files: lib/dfdutils/.gitrepo
114+
Files: external/dfdutils/.gitrepo
115115
Copyright: 2019-2020 The Khronos Group Inc
116116
License: Apache-2.0
117117

@@ -201,10 +201,10 @@ Files: the_khronos_group_inc.p12.enc
201201
Copyright: 2022 The Khronos Group Inc.
202202
License: Apache-2.0
203203

204-
Files: other_projects/fmt/*
204+
Files: external/fmt/*
205205
Copyright: 2012 - present Victor Zverovich
206206
License: MIT
207207

208-
Files: other_projects/cxxopts/*
208+
Files: external/cxxopts/*
209209
Copyright: 2014-2022 Jarryd Beck
210210
License: MIT

0 commit comments

Comments
 (0)