Skip to content

.clang-format: Set ColumnLimit to 0#20963

Merged
maribu merged 1 commit intoRIOT-OS:masterfrom
maribu:clang-format/line-limit
Nov 8, 2024
Merged

.clang-format: Set ColumnLimit to 0#20963
maribu merged 1 commit intoRIOT-OS:masterfrom
maribu:clang-format/line-limit

Conversation

@maribu
Copy link
Copy Markdown
Member

@maribu maribu commented Nov 7, 2024

Contribution description

This disables adding/removing line breaks by clang-format, as this could very well introduce regressions in code formatting in terms of our coding convention: If a long array was matching the soft limit of 80 chars per line, clang-format would reflow it to match the hard limit of 100 chars.

One can selectively disable clang-format with magic comments. But at this point, I'd say we should rather disable this feature until we can configure it in a way to match our coding convention better (without having to add magic comments).

Testing procedure

With this PR, clang-format should not increase the column with above 80 chars anymore.

Issues/PRs references

None

This disables adding/removing line breaks by `clang-format`, as this
could very well introduce regressions in code formatting in terms of
our coding convention: If a long array was matching the soft limit of 80
chars per line, `clang-format` would reflow it to match the hard limit
of 100 chars.

One can selectively disable `clang-format` with magic comments. But at
this point, I'd say we should rather disable this feature until we
can configure it in a way to match our coding convention better (without
having to add magic comments).
@maribu maribu requested a review from mguetschow November 7, 2024 15:20
@maribu maribu added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Nov 7, 2024
Copy link
Copy Markdown
Contributor

@mguetschow mguetschow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, thanks!

@riot-ci
Copy link
Copy Markdown

riot-ci commented Nov 7, 2024

Murdock results

✔️ PASSED

30a3057 .clang-format: Set ColumnLimit to 0

Success Failures Total Runtime
10214 0 10215 15m:14s

Artifacts

@maribu maribu added this pull request to the merge queue Nov 8, 2024
Merged via the queue into RIOT-OS:master with commit 6a19004 Nov 8, 2024
@maribu maribu deleted the clang-format/line-limit branch November 19, 2024 09:28
@MrKevinWeiss MrKevinWeiss added this to the Release 2025.01 milestone Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants