[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] CODING_STYLE: explicitly call out label indentation



commit ded355eaa4e20cd3dfd22d51332451b110d8c954
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Mon Dec 5 13:40:23 2022 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Dec 5 13:40:23 2022 +0100

    CODING_STYLE: explicitly call out label indentation
    
    Since the behavior of "diff -p" to use an unindented label as context
    identifier often makes it harder to review patches, make explicit the
    requirement for labels to be indented.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
 CODING_STYLE | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/CODING_STYLE b/CODING_STYLE
index 5faf274b3a..7d75debcbf 100644
--- a/CODING_STYLE
+++ b/CODING_STYLE
@@ -47,6 +47,10 @@ void fun(void)
     }
 }
 
+Due to the behavior of GNU diffutils "diff -p", labels should be
+indented by at least one blank.  Non-case labels inside switch() bodies
+are preferred to be indented the same as the block's case labels.
+
 White space
 -----------
 
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.