Skip to main content.

NetBSD Developer Documentation: Notes on development and code style

Style


Style

Commit style - one thing at a time (top)

Except where unavoidable, separate commits should be made for:

  • Machine-dependent commits
  • Machine-independent commits
  • bug-fix commits
  • feature-add commits
  • code-cleanup commits
  • ANSIfication commits

While it may seem onerous to do the extra work to keep these things separate, extra work for the committer means less work for everyone else who goes to look at the changes later. There are obvious grey areas - are two features appropriate for one commit, or two - continue to use your judgement.

All these actions help in the later use of cvs diff, annotate, etc.

Code style - "NetBSD source code style guide" (top)

A file entitled the NetBSD source code style guide is located in the tree at src/share/misc/style. If you haven't already, you want to read this as soon as possible.


Back to NetBSD Developer Documentation