Thank you for your interest in improving LinuxScripts!
-
Standards:
- Every script must start with
#!/usr/bin/env bashandset -euo pipefail. - Implement a
--help/-hflag describing usage, options, and dependencies. - Quote all variables properly and handle filenames containing spaces safely.
- Minimize external dependencies; prefer core POSIX / standard Linux utilities.
- Gracefully detect dependencies using
command -v.
- Every script must start with
-
Safety First:
- Default to read-only or dry-run modes where practical.
- Destructive operations (process termination, package removal, cache clearing) must require explicit user confirmation or flags.
- Never run unvalidated
rm -rfcommands. - SSH audits and checks must remain strictly read-only.
-
Testing:
- Verify syntax:
bash -n <script> - Verify ShellCheck:
shellcheck <script> - Ensure the script has executable permissions (
chmod +x <script>). - Run the automated test suite before opening a pull request:
bash tests/test_all.sh
- Verify syntax:
- Keep commits focused, descriptive, and atomic.
- Include an explanation of the change and the testing performed.
- Ensure all tests pass with 0 errors.