Update wiki links to the new short URL
[aur.git] / doc / CodingGuidelines
blob46537bb2f3c03be4397f072dcab92cd1f7f9b10f
1 Coding Guidelines
2 =================
4 DISCLAIMER: We realise the code doesn't necessarily follow all the rules.
5 This is an attempt to establish a standard coding style for future
6 development.
8 Coding style
9 ------------
11 Column width: 79 columns or less within reason.
13 Indentation: tabs (standard eight column width)
14 Please don't add any mode lines. Adjust your editor to display tabs to your
15 preferred width. Generally code should work with the standard eight column
16 tabs.
18 No short open tags. '<?'
19 Do not end files with a close tag. '?>'
20 Try embedding as little XHTML in the PHP as possible.
21 Consider creating templates for XHTML.
23 All markup should conform to XHTML 1.0 Strict requirements.
24 You can use http://validator.w3.org to check the markup.
26 Prevent PHP Notices by using isset() or empty() in conditionals that
27 reference $_GET, $_POST, or $_REQUEST variables.
29 MySQL queries should generally go into functions.
31 Submitting patches
32 ------------------
34 !!! PLEASE TEST YOUR PATCHES BEFORE SUBMITTING !!!
35 Submit uncompressed git-formatted patches to aur-dev@archlinux.org.
37 You will need to register on the mailing list before submitting:
38 https://mailman.archlinux.org/mailman/listinfo/aur-dev
40 Base your patches on the master branch as forward development is done there.
41 When writing patches please keep unnecessary changes to a minimum.
43 Try to keep your commits small and focused.
44 Smaller patches are much easier to review and have a better chance of being
45 pushed more quickly into the main repo. Smaller commits also makes reviewing
46 the commit history and tracking down specific changes much easier.
48 Try to make your commit messages brief but descriptive.
50 Glossary
51 --------
52 git-formatted patch:
53         A patch that is produced via `git format-patch` and is sent via
54         `git send-email` or as an inline attachment of an email.