From eb53f4f8e53d4f348a9e05b1e2f6372c2d6b0267 Mon Sep 17 00:00:00 2001 From: neil Date: Sat, 20 Aug 2022 12:36:39 +0800 Subject: [PATCH] Updated Code of conduct (markdown) --- Code-of-conduct.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Code-of-conduct.md b/Code-of-conduct.md index bb1d05a..08b4d02 100644 --- a/Code-of-conduct.md +++ b/Code-of-conduct.md @@ -24,5 +24,25 @@ And please watch to that issue. Any future bug will be reported there. Example: https://github.com/Neilpang/acme.sh/issues/2057 +### 3. Cross-Platform Compatibility Guide + +1. Don't use `grep -o` options, please use `_egrep_o()` function instead, other grep options may be used with caution. +2. Don't use `curl` or `wget`, please use `_get()` or `_post()` function instead. The `_post()` function can send `POST`, `PUT` or `UPDATE` requests. +3. Do not use `sed -e`, which causes a problem in OS X and BSD. +4. Do not use `sed` with labels, which causes `Label too long` problem in Solaris. +5. Do not use `sed` with newlines (`\n`), which causes a problem in OS X and BSD. +6. Do not use `grep -E` option. +If you need a BSD or Solaris development environment, please head to [vmactions](https://github.com/vmactions). For example, you can use [solaris-shell](https://github.com/vmactions/shell-solaris) to get a shell environment in Solaris. + +## Style Guidelines +acme.sh uses shellcheck for new commits and also enforces style guidelines. +To avoid the most common travis failures: + +* Use indentation with 2 spaces +* remove trailing spaces +* Doublequote variables (use _debug txtvalue "$txtvalue" instead of _debug txtvalue=$txtvalue) +* Always check the travis results after a commit +* Consider using shellcheck (https://www.shellcheck.net/) before commiting +