[go: up one dir, main page]

Skip to content

Regression in 3.6.10: Indentation ignored following two line comment with equal signs

If a C source file has an at least two line contiguous /* */ style code comment with 7 or more equal signs (=) all subsequent indentation formatting is ignored.

The signs in the comment has to end with a sequence of at least 7 equal signs, but can be bookended by other characters. The sequence has to be on the final line of the comment.

Before formatting

/*
 ======= */

void setuplog(const char *loglevel, const char *logfile,
              const bool log_us_timestamp);

if (basename) {
    basename++;
} else {
    basename = log_src_filename;
}

After formatting with 3.6.10

/*
 ======= */

void setuplog(const char *loglevel, const char *logfile,
const bool log_us_timestamp);

if (basename)
{
basename++;
} else
{
basename = log_src_filename;
}

This used to work in 3.6.9 but started happening in 3.6.10. Minimized from real-life examples in the Netatalk codebase.