hartmannathan opened a new pull request #1067:
URL: https://github.com/apache/incubator-nuttx/pull/1067
## Summary
Per the coding standard, we allow MHz as one of the few allowed
exceptions to the identifier case rules.
However, because this exception specifically looked for "MHz" we
would generate undeserved nxstyle errors for Hz, KHz, GHz.
This change adds recognition of any Hz value by eliminating the
requirement for Hz to be preceded by M.
tools/nxstyle.c:
* main(): Eliminate requirement for Hz to be preceded by M to
match the rule for allowed mixed case identifier. Update
relevant comments.
See:
https://cwiki.apache.org/confluence/display/NUTTX/Coding+Standard#macros
Mailing list discussion archived at:
https://lists.apache.org/thread.html/r481b9d145f439c24c8d70992081bf670bc0e893167149e0017519439%40%3Cdev.nuttx.apache.org%3E
## Impact
Several undeserved nxstyle errors will be eliminated for identifiers such as
GPIO_SPEED_400KHz, which are allowed, but were not recognized by the rule
because it didn't match «MHz».
## Testing
Confirmed:
- Compiles without errors or warnings.
- No longer produces undeserved errors for GPIO_SPEED_400KHz.
- nxstyle passes nxstyle.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]