Skip to content

Commit

Permalink
headers: Fix dispatch table formatting
Browse files Browse the repository at this point in the history
The code did not follow the provided clang-format file, which causes
conflict when a developer runs clang-format on the repo. This commit fixes
the generator so that the output is what clang-format would generate.
One issue is that clang-format's ColumnLimit will wrap long lines, and is
very difficult to replicate in python code without excessive changes. The
chosen solution is to use a custom clang-format file for the Utilities
folder which ignores the ColumnLimit.
  • Loading branch information
charles-lunarg committed Aug 25, 2023
1 parent 814391e commit b0712df
Show file tree
Hide file tree
Showing 3 changed files with 793 additions and 779 deletions.
16 changes: 16 additions & 0 deletions include/vulkan/utility/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2023 The Khronos Group Inc.
# Copyright 2023 Valve Corporation
# Copyright 2023 LunarG, Inc.
#
# SPDX-License-Identifier: Apache-2.0

---
# Use defaults from the Google style with the following exceptions:
BasedOnStyle: Google
IndentWidth: 4
AccessModifierOffset: -2
# Modify Disable column limit in generated code
ColumnLimit: 0
SortIncludes: false
...

Loading

0 comments on commit b0712df

Please sign in to comment.