-
Notifications
You must be signed in to change notification settings - Fork 6
Coding style guidelines
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
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.
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.
- https://github.com/styleguide
- http://www.caliban.org/ruby/rubyguide.shtml
- http://wiki.opscode.com/display/chef/Cookbook+Style+Guide+Draft
- http://en.opensuse.org/openSUSE:Ruby_coding_conventions
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?