Changes between Version 7 and Version 8 of RFC4


Ignore:
Timestamp:
Mar 23, 2017, 9:51:10 AM (7 years ago)
Author:
mloskot
Comment:

Add impl. details. Spell check

Legend:

Unmodified
Added
Removed
Modified
  • RFC4

    v7 v8  
    1818There is a need to decide on format of GEOS source code and apply such globally consistent format to GEOS C/C++ codebase.
    1919
    20 A uniform, codebase-wide formatting style makes reading and comprehending existing code easier, writing code focused on important aspects of new developments and more pleasent, removes burden during a patch or pull request code reviews and prevents [http://wiki.c2.com/?WhereDoTheBracesGo bikeshedding religious arguments]. Even in small projects, contributing developers discover the problems of working without an agreed upon code format.
     20A uniform, codebase-wide formatting style makes reading and comprehending existing code easier, writing code focused on important aspects of new developments and more pleasant, removes burden during a patch or pull request code reviews and prevents [http://wiki.c2.com/?WhereDoTheBracesGo bikeshedding religious arguments]. Even in small projects, contributing developers discover the problems of working without an agreed upon code format.
    2121
    2222The utility of such guidelines has been proven by many open source software projects.
    23 
    24 "A mature engineers know that a standard is more important than which standard." ~[MongoDB]
    2523
    2624The scope of the proposal is specifically limited to formatting style guidelines. It is not an intention to develop a general coding guide covering other aspects of writing software like naming, etc.
     
    4442== Code Formatting Rules ==
    4543
    46 What code formatting rules to use?
     44What code formatting rules to use?
     45
     46''"A mature engineers know that a standard is more important than which standard."'' ~[MongoDB]
    4747
    4848`clang-format` offers several defaults (eg. LLVM, Mozilla, Linux, Google C++ Style).
    4949
    50 The proposal recommends to use one of the base styles, if necessary, fine-tunning as an easier way to get started than deciding on each option one by one.
     50The proposal recommends to use one of the base styles, if necessary, fine-tuning as an easier way to get started than deciding on each option one by one.
    5151
    5252The reasons are two-fold:
     
    5656=== `.clang-format` ===
    5757
    58 Proposed below is complete set of settings sufficient to maintain the clean code formatting style. It remains open for refinements.
     58Proposed below is complete set of settings sufficient to maintain the clean code formatting style.
     59
     60NOTE: It remains open for refinements.
    5961
    6062{{{
     
    8789=== `.editorconfig` ===
    8890
    89 [http://editorconfig.org/ EditorConfig] is currently in use and `.editorconfig` file is provied to automatically tell popular code editors about the basic style settings
     91[http://editorconfig.org/ EditorConfig] is currently in use and `.editorconfig` file is provided to automatically tell popular code editors about the basic style settings
    9092like indentation, whitespaces and end-of-line markers for distinguished types of plain text files.
    9193
     
    102104Partial application of the code formatting rules would create more work without delivering the full benefit [MongoDB] leading to codebase with different styles mixed.
    103105
     106==== Implementation ====
     107
     108Branches to run the big reformat in are:
     109
     110* `trunk`
     111* `branches/3.6`
     112* `branches/3.5`
     113* `branches/3.4`
     114
    104115== After Big Reformat ==
    105116
     
    111122  * There is downside of history clutter in repository, but this proposal states that a codebase with different styles across is even worse.
    112123
    113 == Conclusion ==
     124''"After all, every moment of time wasted on code formatting or discussion thereof is eliminated."'' ~[MongoDB]
    114125
    115 "After all, every moment of time wasted on code formatting or discussion thereof is eliminated." ~[MongoDB]
     126==== Implementation ====
     127
     128Set up Travis CI "style safety valve" build dedicated to run clang-format lint based on the approach used in `​clang_format.py` script by MongoDB.
    116129
    117130== References ==