[BUG] NXStyle is not getting braces declaration violation
Description / Steps to reproduce the issue
On which OS does this issue occur?
[OS: Linux]
What is the version of your OS?
all
NuttX Version
mainline
Issue Architecture
[Arch: all]
Issue Area
[Area: Other]
Host information
nxstyle needs to be fixed to catch this issue
Verification
- [x] I have verified before submitting the report.
What does a git bisect find?
@TimJTi it is something that never was suppose to work
Not sure I follow then - when I use checkpatch.sh it always reports Left bracket not on separate line for the violation in your snippet. Perhaps you need to be more specific here?
@TimJTi maybe we can do a test submitting a PR with same code to double check. Maybe nxstyle in our machine catch it, but in the CI ignoring it.
it works for global variables but it doesn't work for function local variables:
/****************************************************************************
* Private Data
****************************************************************************/
const uint8_t g_xxx[] = { ///////////// detected correctly
0x00
};
/****************************************************************************
* Public Functions
****************************************************************************/
void foo(void)
{
int i;
const uint8_t xxx[] = { //////////////////// not detected
0x00, 0x00, 0x00, 0x00
};
return;
}