Gentoo Archives: gentoo-commits

From: "Petteri Räty" <betelgeuse@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/libbash:master commit in: bashast/, coding_standard/
Date: Wed, 30 Mar 2011 12:48:21
Message-Id: 1f8f800cee198affb83f4c86206377ef3f66591e.betelgeuse@gentoo
1 commit: 1f8f800cee198affb83f4c86206377ef3f66591e
2 Author: Mu Qiao <qiaomuf <AT> gentoo <DOT> org>
3 AuthorDate: Mon Mar 28 02:42:05 2011 +0000
4 Commit: Petteri Räty <betelgeuse <AT> gentoo <DOT> org>
5 CommitDate: Tue Mar 29 04:34:45 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/libbash.git;a=commit;h=1f8f800c
7
8 Add indentation rules for grammar and autotools
9
10 Use tabs(ts=4) for grammar and autotools related files. Fixed
11 current indentation.
12
13 ---
14 bashast/bashast.g | 4 ++--
15 coding_standard/coding_standard.tex | 9 ++++++---
16 2 files changed, 8 insertions(+), 5 deletions(-)
17
18 diff --git a/bashast/bashast.g b/bashast/bashast.g
19 index d16ba5c..ef87271 100644
20 --- a/bashast/bashast.g
21 +++ b/bashast/bashast.g
22 @@ -509,8 +509,8 @@ name : NAME
23 //****************
24
25 COMMENT
26 - : (BLANK|EOL) '#' ~('\n'|'\r')* {$channel=HIDDEN;}
27 - ;
28 + : (BLANK|EOL) '#' ~('\n'|'\r')* {$channel=HIDDEN;}
29 + ;
30 //Bash "reserved words"
31 BANG : '!';
32 CASE : 'case';
33
34 diff --git a/coding_standard/coding_standard.tex b/coding_standard/coding_standard.tex
35 index 8230453..ba2e508 100644
36 --- a/coding_standard/coding_standard.tex
37 +++ b/coding_standard/coding_standard.tex
38 @@ -28,7 +28,7 @@ Header files must contain the appropriate ifndef header guard:
39 #ifndef FILENAME_H
40 #define FILENAME_H
41
42 -/*
43 +/*
44 code
45 */
46
47 @@ -76,7 +76,10 @@ Member variables in a class should have the following comment block:
48 \section{Program code}
49 \subsection{Indentation}
50 Every line inside of a code block should be indented for easier readability.\\
51 -Tabs should not be used for indentation, only spaces. Indentation width will be two spaces.
52 +Tabs should not be used for indentation, only spaces. Indentation width will be two spaces. \\
53 +Tabs should be used for ANTLR grammar because antlrworks automatically generate tabs. \\
54 +Tabs should also be used for autotools related files(Makefile.am, configure.ac, etc). \\
55 +Use ts=4 for indentation.
56 \subsection{Naming conventions}
57 The name of a variable, function, class, or struct should be obvious from it's name.\\
58 Names will use underscored names not mixed case.\\
59 @@ -135,4 +138,4 @@ return my_list.size();
60
61 return (index<max_index? index : max_index);
62 \end{verbatim}
63 -\end{document}
64 \ No newline at end of file
65 +\end{document}