-
Notifications
You must be signed in to change notification settings - Fork 15k
copilot: Review instructions for uorb msgs #26169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
|
||
| ## 2. Field Documentation Standards | ||
|
|
||
| - **Inline Comments:** Every field and constant should have a comment on the same line, separated by exactly one space. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
every field no exceptions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have "should" so it isn't "must". But I guess "every" does imply that it is must, and we do have a few exceptions on constants.
How about:
| - **Inline Comments:** Every field and constant should have a comment on the same line, separated by exactly one space. | |
| - **Inline Comments:** Fields and constants should have a comment on the same line, separated by exactly one space. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about fields/constants that are self explanatory? Is it because a comment is required for properly generating documentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dakejahl The toolchain for generating documentation will be smart enough not to care - it will report warnings in some cases but it won't choke if it doesn't find something it needs to render the page.
My take though is that it very rare for a field not to need a comment because they are never as self-explanatory as the author thinks. Especially we require units etc so these should be added.
For contants it isn't as clear, but this section is purely about fields, so I will modify need to modify it to remove "and constant".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But in any case, an author can ignore a comment from copilot, and I'd prefer the suggestion was made and ignored so they think about it.
I have updated this whole section in https://github.com/PX4/PX4-Autopilot/pull/26169/files#r2667007452
| - **Versioning:** If the message is in `msg/versioned/`, it **must** include `uint32 MESSAGE_VERSION`. | ||
|
|
||
| ## 2. Field Documentation Standards | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to specify a naming convention for the fields themselves too?
This uses gemini to write some copilot review instructions based on https://docs.px4.io/main/en/uorb/uorb_documentation
The idea is that copilot should do basic review only any PR that includes msg.
I have not checked this carefully - was hoping to iterate.