Skip to content

Coding style guidelines

jamestyj edited this page Dec 17, 2012 · 5 revisions

This document is a work in progress. Its scope is limited to coding style, and so does not aim to cover general coding guidelines, e.g. procedural topics such as peer code review, automated / manual testing, version control workflow etc.

The original discussion was captured at: http://crowbar.sync.in/sprint0906

Motivation

The current codebase is already fairly consistent in terms of coding style. Therefore the goal of this document is not to create extra work through any significant policy changes, merely to solidify and explicitly document the style conventions already in use, to minimise any future confusion and provide guidelines for new developers.

Guidelines

TODO - These are not written yet.

However, rather than reinvent the wheel, we're looking for already accepted community practice. Lots of prior art which could be used, e.g.

Enforcement of guidelines

Enforcement of guidelines is somewhat of a contradiction in terms. We probably don't want too much enforcement, but maybe some basic automated checks make sense. Here are some ideas we had:

  • Reviewers enforce
  • Git post scripts to validate guidelines?
  • Unit test execution?
  • CI Automation?
  • Gated reviews by git hooks and CI runs?
Clone this wiki locally