-
Type: Technical Debt
-
Resolution: Gone away
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
5
alex.cameron, alexander.gorrod:
The last format pass left us with a lot of oddly broken text strings because they were originally formatted to 80 characters, and clang format didn't handle them that well. Alex, what would you think of a formatting pass to reformat the strings?
It's pretty simple: run something like this script:
#! python import re, sys with open(sys.argv[1], 'r') as f: s = f.read() print re.sub('"\s*"', '', s)
and then re-format the file, and you get this kind of upgrade:
@@ -1300,24 +1284,20 @@ case WT_CELL_VALUE_OVFL: case WT_CELL_VALUE_SHORT: if (unpack.start_ts != WT_TS_NONE && unpack.stop_ts == WT_TS_NONE) - WT_RET_MSG(session, WT_ERROR, "cell %" PRIu32 - " on page at %s has a stop " - "timestamp of 0", - cell_num - 1, __verify_addr_string(session, ref, vs->tmp1)); + WT_RET_MSG(session, WT_ERROR, + "cell %" PRIu32 " on page at %s has a stop timestamp of 0", cell_num - 1, + __verify_addr_string(session, ref, vs->tmp1)); if (unpack.start_ts > unpack.stop_ts) - WT_RET_MSG(session, WT_ERROR, "cell %" PRIu32 - " on page at %s has a " - "start timestamp %s newer than its stop " - "timestamp %s", + WT_RET_MSG(session, WT_ERROR, + "cell %" PRIu32 + " on page at %s has a start timestamp %s newer than its stop timestamp %s", cell_num - 1, __verify_addr_string(session, ref, vs->tmp1), __wt_timestamp_to_string(unpack.start_ts, ts_string[0]), __wt_timestamp_to_string(unpack.stop_ts, ts_string[1])); if (unpack.start_txn > unpack.stop_txn) - WT_RET_MSG(session, WT_ERROR, "cell %" PRIu32 - " on page at %s has a " - "start transaction %" PRIu64 - "newer than " - "its stop transaction %" PRIu64, + WT_RET_MSG(session, WT_ERROR, + "cell %" PRIu32 " on page at %s has a start transaction %" PRIu64 + "newer than its stop transaction %" PRIu64, cell_num - 1, __verify_addr_string(session, ref, vs->tmp1), unpack.start_txn, unpack.stop_txn);