From 4058d1e5b838d91189653fa737ca52c20de8bf05 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Wed, 28 Feb 2018 22:24:44 +0000 Subject: [PATCH] Small review pass for STYLE document git-svn-id: http://svn.osgeo.org/postgis/trunk@16439 b70326c6-7e19-0410-871a-916f4a2858ee --- STYLE | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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. -- 2.50.1