Skip to content
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

Make a short coding style guide in the VTR developer guide #2678

Open
vaughnbetz opened this issue Aug 6, 2024 · 0 comments
Open

Make a short coding style guide in the VTR developer guide #2678

vaughnbetz opened this issue Aug 6, 2024 · 0 comments
Assignees

Comments

@vaughnbetz
Copy link
Contributor

Initial ideas below. This shouldn't be too long, and should be reviewed by others to make sure we agree.

  1. Write code that is easier for others to read.
  2. Add big picture comments.
  • New functions: Doxygen comment in .h file or on static declaration.
    Data structures / classes: comment overall use and every member.
    Files: comment overall purpose of file.
  1. Meaningful variable names. Types usually start with a Capital (older code may not follow this).
  2. Avoid long functions whenever possible (refactor into shorter routines).
    Details:
    Avoid overuse of auto (give rule)
    camel or snake case OK.

Proposed Behaviour

We have some basic coding guidelines written down.

Current Behaviour

We don't have a style guide. We also are gradually evolving some code style (e.g. types moving from t_ to start with a capital, and using references more and pointers less, using Doxygen comments).

Possible Solution

A short style guide under the VTR developer guide.

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

No branches or pull requests

2 participants