Skip to content

Enforce format with clang-format - #175

Open
tmccombs wants to merge 2 commits into
emersion:masterfrom
tmccombs:format-enforce
Open

Enforce format with clang-format#175
tmccombs wants to merge 2 commits into
emersion:masterfrom
tmccombs:format-enforce

Conversation

@tmccombs

@tmccombs tmccombs commented Sep 10, 2025

Copy link
Copy Markdown
Contributor
I tried to use config that minimized the changes, but there were some
existing inconsistencies in the format and some things I couldn't quite
get clang-format to due.

For example, I couldn't find a way to get clang-format to use more
indentation for continuation of parameter lists than for other types of
line continuation.

I also used ColumnLimit: 0, because anything else would add considerable
changes to either put things on the same line, split lines up, or both.

I figured if we want to set a limit, we could do that in a separate PR.

I'm also totally open to changing any of the configuration options.

If clang-format is too prescriptive, I could also just add something to
enforce that indentation is done with tabs instead of spaces.

To make sure it is included before `bool` is used
I tried to use config that minimized the changes, but there were some
existing inconsistencies in the format and some things I couldn't quite
get clang-format to due.

For example, I couldn't find a way to get clang-format to use more
indentation for continuation of parameter lists than for other types of
line continuation.

I also used ColumnLimit: 0, because anything else would add considerable
changes to either put things on the same line, split lines up, or both.

I figured if we want to set a limit, we could do that in a separate PR.

I'm also totally open to changing any of the configuration options.

If clang-format is too prescriptive, I could also just add something to
enforce that indentation is done with tabs instead of spaces.
@tmccombs
tmccombs requested a review from emersion September 10, 2025 07:16
@emersion

emersion commented Feb 1, 2026

Copy link
Copy Markdown
Owner

clang-format cannot enforce the style used by wlroots (and slurp).

@tmccombs

tmccombs commented Feb 1, 2026

Copy link
Copy Markdown
Contributor Author

Is there a rool that can? Currently, there is some inconsistency in style.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants