This is an automated email from the ASF dual-hosted git repository.

sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git


The following commit(s) were added to refs/heads/main by this push:
     new 5b5381a  Add code conventions for shell scripts and OCI container files
5b5381a is described below

commit 5b5381a3864caa294523ab6f6f17f67859efb993
Author: Sean B. Palmer <[email protected]>
AuthorDate: Sun Dec 7 11:27:16 2025 +0000

    Add code conventions for shell scripts and OCI container files
---
 .gitignore                   |  2 +-
 atr/docs/code-conventions.md | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index 53a261d..1a13f0a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,7 +13,7 @@ apptoken.txt
 atr/_version.py
 bootstrap/build/
 dev/
-docs/
+/docs/
 node_modules/
 package-lock.json
 state/
diff --git a/atr/docs/code-conventions.md b/atr/docs/code-conventions.md
index 007029f..2b5cbfb 100644
--- a/atr/docs/code-conventions.md
+++ b/atr/docs/code-conventions.md
@@ -274,3 +274,23 @@ Do not use `*` for emphasis or `__` for strong emphasis.
 ### Do not use JavaScript unless necessary
 
 It is often possible to avoid using JavaScript without significant loss of 
functionality, but it may require a little more thought. JavaScript is not, 
however, something to avoid by rote. User experiences can be significantly 
improved with thoughtful application of JavaScript. Therefore, default to not 
using JavaScript, but consider how it could be used concisely and with care to 
improve UX.
+
+## Shell
+
+### Use POSIX sh only
+
+Do not use bash or other idioms, only POSIX sh. Ensure that all commands 
called from the shell script are available in the POSIX standard, using only 
POSIX flags and arguments.
+
+### Use two spaces for indentation
+
+In some cases it may make more sense to indent at other levels, e.g. in `case` 
blocks.
+
+### Do not use hanging keywords
+
+Avoid the use of `; then`. Always put keywords on their own line.
+
+## OCI container files ("dockerfiles")
+
+### Be FHS compliant
+
+Don't create directories which are not defined in the most recent [Filesystem 
Hierarchy 
Standard](https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html). If 
adding a directory whose role in the FHS is unclear, try to copy practices from 
established Linux distributions.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to