From c787c60e68d04256df5c76449fec7e9c92839eb1 Mon Sep 17 00:00:00 2001 From: Wetitpig Date: Wed, 13 Feb 2019 07:33:20 +0800 Subject: [PATCH] Add more coding practices --- docs/FORMAT.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/FORMAT.md b/docs/FORMAT.md index 0fe9b0ddf..c6d644e5f 100644 --- a/docs/FORMAT.md +++ b/docs/FORMAT.md @@ -2,7 +2,7 @@ All files should adhere to these formatting guidelines. -## Script +## Shell Script Formatting - All `build.sh` should be set to `644` permission. @@ -14,9 +14,15 @@ All files should adhere to these formatting guidelines. - Comments should be compact. Do not tab them if not necessary. +## Shell Script Coding Practices + - Dollar parentheses `$()` rather than backticks ``` `` ``` should be employed in command substitution. -## Markdown +- `install` is preferred over `cp` as the installation program. + +- Version numbers should never be hard-coded. Instead, use the `$TERMUX_PKG_VERSION` and `$TERMUX_PKG_REVISION` variables. + +## Markdown Formatting - All `filenames` should be under code formatting, unless they are links.