Skip to content

Commit

Permalink
Prototype clang-format support
Browse files Browse the repository at this point in the history
  • Loading branch information
aqnuep committed Apr 3, 2024
1 parent 7a45c4e commit 948dc38
Show file tree
Hide file tree
Showing 1,099 changed files with 203 additions and 127 deletions.
11 changes: 11 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright 2024 The Khronos Group Inc.
# SPDX-License-Identifier: Apache-2.0
---
# Use defaults from the Google style with the following exceptions:
Language: Cpp
BasedOnStyle: Google
IndentWidth: 4
IndentCaseLabels: false
ColumnLimit: 132
SortIncludes: false
...
37 changes: 37 additions & 0 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Copyright 2024 The Khronos Group Inc.
# Copyright 2024 RasterGrid Kft.
# SPDX-License-Identifier: Apache-2.0
name: Formatting

on:
# Trigger the workflow on a pull request,
pull_request:

push:
# And on pushes to main, which will occur when a PR is merged.
branches:
- main
# Also trigger on push of release tags to any branch. Useful
# for testing release builds before merging to main.
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-*'
paths-ignore:
- .appveyor.yml
- .travis.yml

permissions:
contents: read

jobs:
clang-format:
name: clang-format
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Run clang-format
uses: jidicula/[email protected]
with:
clang-format-version: '16'
13 changes: 6 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@
# /include/
/include/imdebug.h

# /lib/
/lib/astc-encoder/.gitmodules
/lib/astc-encoder/Source/GoogleTest
/lib/basisu/bin_osx
/lib/basisu/bin
/lib/basisu/build
/lib/src
# /external/
/external/astc-encoder/.gitmodules
/external/astc-encoder/Source/GoogleTest
/external/basisu/bin_osx
/external/basisu/bin
/external/basisu/build

# /testimages/
/testimages/*.png
Expand Down
24 changes: 12 additions & 12 deletions .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -70,48 +70,48 @@ Files: */*.json
Copyright: 2017-2020 Mark Callow
License: Apache-2.0

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
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
Copyright: 2020-2021 Arm Limited
License: Apache-2.0

Files: lib/astc-encoder/.gitrepo
Files: external/astc-encoder/.gitrepo
Copyright: 2021 Mark Callow
License: Apache-2.0

Files: lib/astc-encoder/Source/stb_image*.h
Files: external/astc-encoder/Source/stb_image*.h
Copyright: 2017 Sean Barrett
License: MIT

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

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

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

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

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

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

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

Files: lib/dfdutils/.gitrepo
Files: external/dfdutils/.gitrepo
Copyright: 2019-2020 The Khronos Group Inc
License: Apache-2.0

Expand Down Expand Up @@ -201,10 +201,10 @@ Files: the_khronos_group_inc.p12.enc
Copyright: 2022 The Khronos Group Inc.
License: Apache-2.0

Files: other_projects/fmt/*
Files: external/fmt/*
Copyright: 2012 - present Victor Zverovich
License: MIT

Files: other_projects/cxxopts/*
Files: external/cxxopts/*
Copyright: 2014-2022 Jarryd Beck
License: MIT
Loading

0 comments on commit 948dc38

Please sign in to comment.