-
Notifications
You must be signed in to change notification settings - Fork 22
/
CODING-GUIDE
39 lines (27 loc) · 1.07 KB
/
CODING-GUIDE
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
This document is meant to be concise. It's not a summary
of "best practices", but some general guidelines and what
kind of languages are preferred. If there are specific language
constructs and practices that are required, it's noted.
Recommended for maximum portability
* Perl (ASGS installs its own via perlbrew)
* bash (uses the system's bash)
* sh (provide it'll work in bash - which it should)
* standard unix toolset (sed, find, grep, etc)
* awk
* make/gmake (for building and some kinds of automation)
Discouraged (for new things)
* cmake, other non-standard build tools
* any unix shell scripting that isn't supported by bash or sh (non-bourne/bourne-again compliant)
* python (any version)
Language Specific "standards"
Perl
* use "3 arg" 'open'
* sprintf is preferred over 'concatenation' operator, "."
* use strict;
* use warnings;
bash
* quote variables
* use arrays and associative arrays to define lists
* implicitly iterate over arrays (including associative) (no index counting)
awk
* don't use any OS specific extensions (e.g., gawk, nawk, etc may implement in some)