Standard: Code sanitization #164
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The coding standard requires a sanitization of the code so that it can be reliable for mission critical runtime i.e flying an aircraft.
Proof-of-concept
Is not sanitized and if the runtime in the code below depends on the directory
somethingthen it's going to cause a cascade failure.Expected:
This way the software is able to exit safely assuming that standard utilities alike
mkdirare checked appropriately prior to mission critical task.Helpful error message is also expected.
The
elsestatements should be only used for an unexpected trap to capture code quality issues i.e if there is an unexpected symlink namedsomethingthat would trigger exit 255 (these should hopefully have a helpful message too)There should be an attempt to avoid fatal failure.
Issue-Label Bot is automatically applying the label
feature_requestto this issue, with a confidence of 0.74. Please mark this comment with 👍 or 👎 to give our bot feedback!Links: app homepage, dashboard and code for this bot.