REQUEST: Implement standard for Shell/Bash #117

Open
opened 2020-05-09 09:30:22 +02:00 by Kreyren · 0 comments
Kreyren commented 2020-05-09 09:30:22 +02:00 (Migrated from github.com)

Describe the feature

I've developed a custom standard for Shell/Bash that should be published under Zernit project to ensure code quality of these files

Expected behavior

  • Checkpointing
  • Traps to avoid unexpected
  • Concern for cosmic rays
  • esnitch implementation (if we are using something that we don't expect end-user to mess with to implement an auto-ban or alike feature to handle the script)
  • Peer-review requirement - All the code should be reviewed by known experts to be considered up to standard, these people should sign the file with their GPG so that they can be informed if they miss something to push the code quality higher
  • Requirement for shellcheck
  • Requirement for Abstracting - MANDATORY! Ensures that the code is not overly complicated or that the code does what it is supposed to do.
  • POSIX Compatibilty - All Shell/bash scripts should start with shebang #!/bin/sh so that they are expected to be posix compatible. If there is something that we can't do alike arrays we should change the shebang on #!/bin/bash or #!/usr/bin/env bash and put a comment; # POSIX: Reason to why this doesn't work on posix above the conflicting code so that it can be converted to posix-compatibility on demand
  • All scripts should have a security layer to ensure that they are working on sane shell
  • All scripts should have a version tracking so that we know which versions are working, this should be indexed during the development and changes applied based on bash versions
  • (optional) Allow end-users to customize the output.
  • (optional) Provide a translations so that the script can speak other languages
  • All scripts has to have valid copyright notice
### Describe the feature <!-- Give us a **short** summary of your proposed feature --> I've developed a custom standard for Shell/Bash that should be published under Zernit project to ensure code quality of these files ### Expected behavior <!-- What do you expect to happend instead of current behavior? --> - Checkpointing - Traps to avoid unexpected - Concern for cosmic rays - `esnitch` implementation (if we are using something that we don't expect end-user to mess with to implement an auto-ban or alike feature to handle the script) - Peer-review requirement - All the code should be reviewed by known experts to be considered up to standard, these people should sign the file with their GPG so that they can be informed if they miss something to push the code quality higher - Requirement for shellcheck - Requirement for Abstracting - MANDATORY! Ensures that the code is not overly complicated or that the code does what it is supposed to do. - `POSIX` Compatibilty - All Shell/bash scripts should start with shebang `#!/bin/sh` so that they are expected to be posix compatible. If there is something that we can't do alike arrays we should change the shebang on `#!/bin/bash` or `#!/usr/bin/env bash` and put a comment; `# POSIX: Reason to why this doesn't work on posix` above the conflicting code so that it can be converted to posix-compatibility on demand - All scripts should have a security layer to ensure that they are working on sane shell - All scripts should have a version tracking so that we know which versions are working, this should be indexed during the development and changes applied based on bash versions - (optional) Allow end-users to customize the output. - (optional) Provide a translations so that the script can speak other languages - All scripts has to have valid copyright notice
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kreyren/Zernit#117