current codes after applying clang-format is:
#ifndef CEEDLING_TEST
static
#endif
void
Measurement(const uint16_t *buff)
{
g_rmsValue1ms = Get1msRmsValue(buff);
g_rmsValue60ms = MovingAvgFilter(&g_MaFilter, g_rmsValue1ms);
}
expected:
#ifndef CEEDLING_TEST
static
#endif
void Measurement(const uint16_t *buff)
{
g_rmsValue1ms = Get1msRmsValue(buff);
g_rmsValue60ms = MovingAvgFilter(&g_MaFilter, g_rmsValue1ms);
}
Does someone knows which parameter is used to define the behavior like that?
I am not aware of the clang-format option for that.
I'd suggest a small change to your code. Instead of
#ifdef-ing thestatickeyword, you could#ifdefa macro, that decides whether the function is static. This not only resolves issue with clang-format, but also potentially saves you a lot of#ifdef CEEDLING_TESTs and#endifs.