nxstyle produces errors about mixed case identifiers like the
following, which are found throughout the system:
GPIO_SPEED_100MHz
GPIO_SPEED_10MHz
GPIO_SPEED_120MHz
GPIO_SPEED_25MHz
GPIO_SPEED_2MHz
GPIO_SPEED_400KHz
GPIO_SPEED_40MHz
GPIO_SPEED_50MHz
GPIO_SPEED_5MHz
Are abbreviations like MHz, KHz, Hz, intended to be exceptions to the
mixed case rules?
Yes, the coding standard is here:
https://cwiki.apache.org/confluence/display/NUTTX/Coding+Standard
The exceptions are here:
https://cwiki.apache.org/confluence/display/NUTTX/Coding+Standard#macros
The logic that handles the exceptions for nxstyle is here:
https://github.com/apache/incubator-nuttx/blob/master/tools/nxstyle.c#L1394
The specific logic to ignore MHz is here:
https://github.com/apache/incubator-nuttx/blob/master/tools/nxstyle.c#L1463
If that is not working, then please consider a PR. I see logic that
picks off and ignores MHz but nothing that looks for Hz. You might want
to add that. That should be something like:
else if(!have_upper || n < 1|| line[n - 1] != 'H')
{
have_lower = true
}
But I am sure you can be more clever.
Greg