Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

.clang-format: Set ColumnLimit to 0 #20963

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

maribu
Copy link
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
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

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
28 checks passed
@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
# for free to join this conversation on GitHub. Already have an account? # 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