Go To Top
Return to Build and Run Scripts
Shell scripts should follow predictable conventions so that developers and reviewers can understand what each script does, what it changes, and how it fails.
Each shell script should:
-
Include a file header that identifies the script purpose, expected working directory, required inputs, modified outputs, exit-code behavior, and important dependencies.
-
Validate required tools, files, directories, arguments, and environment variables before performing destructive or irreversible actions.
-
Use clear function names for repeated logic.
-
Write diagnostic output that supports troubleshooting and CI logs.
-
Return zero on success and non-zero on failure.
-
Avoid hard-coded absolute paths.
-
Avoid relying on undocumented shell aliases, shell profiles, editor settings, or user-specific environment variables.
-
Use Repository-relative paths where practical.
-
Treat missing required inputs as failures.
-
Treat missing optional inputs as warnings where appropriate.
-
Avoid destructive actions unless the script name, help text, and documentation make those actions clear.
Shell scripts should use portable shell behavior where practical. If a script requires Bash-specific features, the file header and Script Reference should say so. If the team supports Windows through WSL, PowerShell, or another shell environment, the relevant checklist instance should identify the expected shell.
© 2026 Dido Solutions, Inc. and Jackrabbit Consulting, Inc.