Skip to content

Conversation

@hamishwillee
Copy link
Contributor

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.

@hamishwillee hamishwillee requested a review from MaEtUgR December 24, 2025 05:01

## 2. Field Documentation Standards

- **Inline Comments:** Every field and constant should have a comment on the same line, separated by exactly one space.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

every field no exceptions?

Copy link
Contributor Author

@hamishwillee hamishwillee Jan 2, 2026

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:

Suggested change
- **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.

Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor Author

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

Copy link
Contributor Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants