You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our coding style guide shows function header like this:
/****************************************************************************
* Name: <Global function name>
*
* Description:
* Description of the operation of the function.
*
* Input Parameters:
* A list of input parameters, one-per-line, appears here along with a
* description of each input parameter.
*
* Returned Value:
* Description of the value returned by this function (if any),
* including an enumeration of all possible error values.
*
* Assumptions/Limitations:
* Anything else that one might need to know to use this function.
*
****************************************************************************/
but there are many places in the code where this new line is not added, e.g.:
/****************************************************************************
* Name: sensor_custom_unregister
*
* Description:
* This function unregister character node and release all resource about
* upper half driver. This API corresponds to the sensor_custom_register.
*
* Input Parameters:
* dev - A pointer to an instance of lower half sensor driver. This
* instance is bound to the sensor driver and must persists as long
* as the driver persists.
* path - The user specifies path of device, ex: /dev/uorb/xxx
****************************************************************************/
Function header sections. Within the function header, the following data sections must be provided:
...
Each of these data sections is separated by a single line like *.
Should we correct these places to match the coding standard and pay more attention when reviewing code ?
I know it's a trivial problem, but for some reason it really irritates me when I don't see this additional empty line :)
The text was updated successfully, but these errors were encountered:
Is it possible to also add rules in tools/uncrustify.cfg? thus we can use uncrusity tool to fix the formating issue.
Currently version of uncrustify.cfg seems wrong on block comment styles.
Our coding style guide shows function header like this:
The end of the header is preceded by a new line:
but there are many places in the code where this new line is not added, e.g.:
And from the doc https://nuttx.apache.org/docs/latest/contributing/coding_style.html#function-headers:
Should we correct these places to match the coding standard and pay more attention when reviewing code ?
I know it's a trivial problem, but for some reason it really irritates me when I don't see this additional empty line :)
The text was updated successfully, but these errors were encountered: