ShapeWorks icon indicating copy to clipboard operation
ShapeWorks copied to clipboard

ShapeWorks coding style guide

Open sheryjoe opened this issue 5 years ago • 2 comments

A document for development coding conventions (e.g. include with " vs <), naming, pragma once ... etc

sheryjoe avatar Sep 26 '19 15:09 sheryjoe

My favorite will be where to put the opening braces.

function(...) {
  ...
}

function(...)
{
  ...
}

(fwiw, these days I'm in favor of the first, on the same line; maybe we should vote)

Regardless of the current state, a coding standard will help us all move forward cohesively. The more I go over different modules created by different people, the more I both miss and appreciate consistency.

cchriste avatar Sep 17 '21 19:09 cchriste

Probably best to start from something existing, for example:

https://google.github.io/styleguide/

For formatting, you can do "clang-format --style=google"

This can even be built into actions for PRs

akenmorris avatar Sep 17 '21 20:09 akenmorris