On Mon, May 03, 2021 at 01:22:13PM +0200, Ævar Arnfjörð Bjarmason wrote: > On Sat, May 01 2021, Jeff King wrote: > > > Many calls to report() in fsck_tree() are kept on a single line and are > > quite long. Most were pretty big to begin with, but have gotten even > > longer over the years as we've added more parameters. Let's accept the > > churn of wrapping them in order to conform to our usual line limits. > > If we're going to have the churn I'd say just wrap the rest of the file > as well, now it's mostly-consistent in having these long lines. > > FWIW I think having the long lines makes things more readable in this > case, but the inconsistency is worse. I'm not sure I agree. It depends on how big a chunk you consider for consistency: a function, a file, or the whole project. fsck_tree() was already inconsistent, so this is making that function totally consistent. Since that was the function I was working in, that seemed like the limit of "while I'm here", and I'd prefer to keep it there for the series. I certainly don't mind extra clean up on top, though. As far as preferring the long lines, I don't mind lines a _little_ long, but some of these are 120+ characters. They wrap awkwardly even on my extra-wide terminals. ;) I guess we can have a discussion on whether long lines are OK, but it should probably center on what we put into CodingGuidelines, and not these particular lines. > I wonder if this whole thing wouldn't be better by declaring the format > in the msg_id_info struct. I.e. add this to fsck.h, but that's an even > bigger change... I think it gets tricky, as not all of the strings have the same number and type of format specifiers (most don't have any, but verify_headers() for example uses %ld). -Peff