I was experimenting with this some more and figured it might help move things along if people can actually see the result on gerrit. There are parts that need more tweaking, so hopefully somebody with more clang-format experience can offer suggestions to fix remaining issues.
Patch set 4:Code-Review -2
3 comments:
Patch Set #4, Line 148: static const struct buspirate_speeds spispeeds[] = { { "30k", 0x0 }, { "125k", 0x1 }, { "250k", 0x2 },
clang-format seems to have weird rules regarding lists. The only workaround I found for this is to set ColumnLimit to 0, but that has obvious issues with line length.
Patch Set #4, Line 659: case CHIPSET_300_SERIES_CANNON_POINT: boot_straps = boot_straps_pch8_lp; break;
We use case labels inconsistently - some are on their own line and some are condensed so that the entire statement is on a single line.
I suspect we'll want to use the non-condensed format throughout flashrom, i.e. AllowShortCaseLabelsOnASingleLine: false
Patch Set #4, Line 60: enum dediprog_leds {
Alignment of assignments is another area where clang-format seems lacking. We generally don't force alignment of variable assignments, however when the assignments form a list of allowable values such as these enums it's preferable to align the assignments.
To view, visit change 38673. To unsubscribe, or for help writing mail filters, visit settings.