Project

General

Profile

Feature #1190

codingstyle document

Added by Sage Weil over 8 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
06/15/2011
Due date:
% Done:

0%

Source:
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

History

#1 Updated by Sage Weil about 8 years ago

  • Target version changed from v0.31 to v0.32

#2 Updated by Sage Weil about 8 years ago

Looks basically fine to me (tho i didn't read the whole thing). It leaves a lot of stuff unspecified, though. Notably, they allow all of

if (condition) foo;
if (condition)
foo;
if (condition {
foo;
}

I like the linux kernel guidelines, which specify

- no single line if (easy to miss when visually scanning code; sadly i did a lot of this in the older mds code)
- no braces for single line then block

Both specify that the then and else blocks must neither or both have braces.

#3 Updated by Sage Weil about 8 years ago

  • translation missing: en.field_position set to 709

#4 Updated by Sage Weil about 8 years ago

  • translation missing: en.field_story_points set to 5
  • translation missing: en.field_position deleted (720)
  • translation missing: en.field_position set to 720

#5 Updated by Sage Weil about 8 years ago

  • Assignee set to Sage Weil

#6 Updated by Sage Weil about 8 years ago

  • Status changed from New to Resolved

Also available in: Atom PDF