Limit number of columns to 160#1491
Conversation
|
It looks like we're gonna need to fix all the instances where the columns are long or limit it from CI being the cause of failing. But I'm all for the idea! |
|
... and it seems, I'm using a different clang-format version (21.1.0) than the CI. Is version to use specified, somewhere? |
|
clang-format version is listed here. Not sure if that's up-to-date though. |
|
Looking at the numerous changes: Increasing the column limit might make sense, but some of the changes make code harder to read. Not sure if this is something we want to apply across the board to all samples. |
You mean, even more than 160 columns?
Could you point me at some of those places? Maybe with some additional clang-format settings, it looks better, again.
I think, it should either be done for the complete repository, or not at all. |
74641fa to
ca0d397
Compare
ca0d397 to
3eb0a5d
Compare
|
Well, in fact it's clang-format 15.0.6, that is used. And for some unknown reasons, it required a few manual adjustments. But I definitely won't crank up the copyright of all those formatted files. |
Description
Every now and then, I'm surprised about the length of some code lines. I would suggest to limit that to, say, 160.
The only manual change in this PR is in
.clang-format, settingColumnLimit : 160. Then all *.cpp and *.h files are formatted accordingly.In addition to the column limit I added the following options:
AlignConsecutiveMacros: ConsecutiveBraceWrapping: BeforeLambdaBody: trueBuild tested on Win11 with VS2022. Run tested on Win11 with NVidia GPU.
General Checklist:
Please ensure the following points are checked:
Note: The Samples CI runs a number of checks including:
If this PR contains framework changes:
batchcommand line argument to make sure all samples still work properlySample Checklist
If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist: