Format the code using clang-format#890
Merged
whot merged 2 commits intolinuxwacom:masterfrom Jul 9, 2025
Merged
Conversation
version 6.10 is currently the most recent one with changes, subsequent
releases do not change this file.
A few more key codes that we don't need ourselves but this fixes
compilation issues that occur depending on the include file order:
[1/13] Compiling C object libwacom.so.9.0.0.p/libwacom_libwacom-database.c.o
In file included from ../libwacom/libwacom-database.c:33:
../include/linux/input-event-codes.h:280:9: warning: ‘KEY_DASHBOARD’ redefined
280 | #define KEY_DASHBOARD 204 /* AL Dashboard */
| ^~~~~~~~~~~~~
In file included from /usr/include/linux/input.h:18,
from /usr/include/libevdev-1.0/libevdev/libevdev.h:33,
from ../libwacom/libwacom-database.c:32:
/usr/include/linux/input-event-codes.h:282:9: note: this is the location of the previous definition
282 | #define KEY_DASHBOARD KEY_ALL_APPLICATIONS
Member
Author
|
Note that I'll add a |
This is fairly close to what we have and at least enforces a consistent coding style. The only true change in style is no indentation for case in switch statements, the rest is a combination of styles we already used in one place or another, just not consistently.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The style is fairly close to what we have and at least enforces a consistent
coding style. The only true change in style is no indentation for case
in switch statements, the rest is a combination of styles we already
used in one place or another, just not consistently.
There are a handful of outliers that I'm not very happy with (e.g. the
__attribute__(printf)being split up and clang-format apparently being unable to align function argument names which I quite liked. But hey, just like ruff and cargo fmt it's better to have something that's not perfect but at least consistent.Closes #868