Revision: 701 http://svn.savannah.gnu.org/viewvc/?view=rev&root=administration&revision=701 Author: iank Date: 2023-12-12 15:01:48 -0500 (Tue, 12 Dec 2023) Log Message: ----------- formatting fixes
Modified Paths: -------------- trunk/sviki/fsf/bash-style-guide.mdwn Modified: trunk/sviki/fsf/bash-style-guide.mdwn =================================================================== --- trunk/sviki/fsf/bash-style-guide.mdwn 2023-12-12 20:00:40 UTC (rev 700) +++ trunk/sviki/fsf/bash-style-guide.mdwn 2023-12-12 20:01:48 UTC (rev 701) @@ -73,30 +73,34 @@ take untrusted input, or process files or variables which could have spaces, run shellcheck with no exceptions to verify quoting. -* # 2046 = unquoted $(cmd) -* # 2068 = Double quote array expansions to avoid re-splitting elements. -* # 2086 = unquoted $var -* # 2206 = unquoted $var in array=($var) -* # 2254 = unquoted $var in case x in $var) +``` +# 2046 = unquoted $(cmd) +# 2068 = Double quote array expansions to avoid re-splitting elements. +# 2086 = unquoted $var +# 2206 = unquoted $var in array=($var) +# 2254 = unquoted $var in case x in $var) +``` Miscellaneous exceptions: -* # 2029 = Using unescaped variable in ssh call. Reason: This never +``` +# 2029 = Using unescaped variable in ssh call. Reason: This never works, warning is generally a false positive. -* # 2032 = Warning about calling shell function over ssh. There are ways +# 2032 = Warning about calling shell function over ssh. There are ways for this to be a false positive, and we generally don't need a warning that shellcheck doesn't know if a command exists. -* # 2033 = shell function as argument to another shell. Reason: This never +# 2033 = shell function as argument to another shell. Reason: This never works, warning is generally a false positive. -* # 2054 = Array declaration contains a comma. Reason: This is warning of a +# 2054 = Array declaration contains a comma. Reason: This is warning of a mistake based on how other languages work, but this would never work as expected in bash and is a legitimate thing to do. -* # 2164 = cd without condition for failure. Reason: We use automatic error +# 2164 = cd without condition for failure. Reason: We use automatic error handling. +``` This is based on shellcheck version: 0.8.0 from trisquel 11. A newer shellcheck probably has new rules worth ignoring.