arjav1528 opened a new pull request, #19001:
URL: https://github.com/apache/nuttx/pull/19001

   ## Summary
   
   The ROS 2 C client API exposes message types through `rosidl` token-pasting 
macros. Each message type ends up with a generated symbol of the form 
`<pkg>__msg__<Type>` (e.g. `std_msgs__msg__Int32`), and the bare type token 
(`Int32`, `Float64`, ...) appears in user code as an argument to 
`ROSIDL_GET_MSG_TYPE_SUPPORT()`. Neither form can be renamed without breaking 
the public API.
   
   Add the ROS 2 standard message package prefixes and the rosidl scalar type 
names to `g_white_prefix` so `nxstyle` does not flag the resulting mixed-case 
identifiers in apps that consume micro-ROS via `apps/system/microros`.
   
   Whitelisted prefixes:
   
   - Packages: `std_msgs`, `geometry_msgs`, `sensor_msgs`, `nav_msgs`, 
`builtin_interfaces`, `rcl_interfaces`.
   - Scalars: `Int8`, `Int16`, `Int32`, `Int64`, `UInt8`, `UInt16`, `UInt32`, 
`UInt64`, `Float32`, `Float64`.
   
   Follows the existing precedent for external ecosystems in the same list 
(`cJSON`, `NativeSymbol`, `Ifx`, `lua_`, `TEEC_`, ...).
   
   ## Impact
   
   - `tools/nxstyle` only. No build, runtime, or hardware effect.
   - Pure relaxation of the style checker for a fixed, enumerated setof 
identifiers. No existing in-tree code becomes invalid; only previously-flagged 
ROS 2 token-pasted identifiers stop being flagged.
   
   ## Dependencies
   
   Companion to apache/nuttx-apps#3512 (`system/microros: Add UDP and serial 
custom transports with publisher example`). That PR's CI nxstyle step fails on 
`apps/examples/microros_pub/microros_pub_main.c` until this lands.
   
   ## Testing
   
   Local build of the patched `tools/nxstyle` and run against every C/H file 
touched by apache/nuttx-apps#3512:
   
   ```
   $ gcc -O2 -o tools/nxstyle tools/nxstyle.c
   $ for f in <8 touched .c/.h paths>; do ./tools/nxstyle "$f"; done
   (no output -> all clean)
   ```
   
   Before this patch (same nxstyle build minus the whitelist additions):
   
   ```
   apps/examples/microros_pub/microros_pub_main.c:45:7: error: Mixed case 
identifier found
   apps/examples/microros_pub/microros_pub_main.c:84:51: error: Mixed case 
identifier found
   ```
   
   After: 0 errors, 0 warnings on the same 8 files.
   
   No other in-tree files reference any of the added prefixes, so the
   whitelist relaxation is scoped to the new ROS 2 surface.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to