-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathstyleguide.txt
47 lines (39 loc) · 1.77 KB
/
styleguide.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
documentation style
===================
- reStructuredText formatting is used
(http://docutils.sourceforge.net/docs/user/rst/quickref.html)
- the first letter in each sentence is not capitalized
- the last sentence in each paragraph has no final period. final ?'s and !'s are
allowed
- text is wrapped to a new line at 80 characters
BASH script style
=================
every script, except for skeleton scripts provided for the user, must start with
the following header::
#!/bin/bash
#
# ONE LINE DESCRIPTION OF WHAT THIS SCRIPT DOES
# Copyright (C) 2010 AUTHOR NAME (AUTHOR EMAIL ADDRESS)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
skeleton scripts must start with this header::
#!/bin/bash
#
# SCRIPTNAME does... (ONE LINE DESCRIPTION OF WHAT THIS SCRIPT DOES)
# original author: AUTHOR NAME (AUTHOR EMAIL ADDRESS)
# this script was provided by NeuroPipe. modify it to suit your needs
- leave exactly 1 blank line after the header, before any code starts
- variables that are set once and don't change (constants) are named in ALL_CAPS
- $var syntax is used wherever possible, because ${var} is ugly
- inside of if [] blocks, "$var" is used instead of $var