From: Sandro Santilli Date: Wed, 28 Feb 2018 22:24:44 +0000 (+0000) Subject: Small review pass for STYLE document X-Git-Tag: 2.5.0alpha~87 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4058d1e5b838d91189653fa737ca52c20de8bf05;p=postgis Small review pass for STYLE document git-svn-id: http://svn.osgeo.org/postgis/trunk@16439 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/STYLE b/STYLE index 083ef822c..b1a0fe092 100644 --- a/STYLE +++ b/STYLE @@ -15,21 +15,25 @@ from time to time, we will eventually get there. :Formatting: -All C code should use an ANSI standard formatting with tabs for block +Most C code should use an ANSI standard formatting with tabs for block indenting. When not block indenting, use spaces. To convert a file to the standard format use: astyle --style=ansi --indent=tab +Some files use space indenting instead (check .editorconfig for info). +For them, you can use: + + astyle --style=ansi --indent=spaces=2 + Do not get too happy with this command. If you want to re-format a file you are working on: a) run astyle on it b) commit c) do your work - d) commit - e) if you are really finicky run astyle again - f) commit + d) run astyle again + e) commit The idea is to avoid combining style-only commits and commits that change logic, so the logic commits are easier to read.