You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Restrict all code to very simple control flow constructs—do not use goto statements, setjmp or longjmp constructs, or direct or indirect recursion.
Give all loops a fixed upper bound.
Do not use dynamic memory allocation after initialization.
No function should be longer than what can be printed on a single sheet of paper in a standard format with one line per statement and one line per declaration.
The code's assertion density should average to minimally two assertions per function.
Declare all data objects at the smallest possible level of scope.
Each calling function must check the return value of nonvoid functions, and each called function must check the validity of all parameters provided by the caller.
The use of the preprocessor must be limited to the inclusion of header files and simple macro definitions.
Limit pointer use to a single dereference, and do not use function pointers.
Compile with all possible warnings active; all warnings should then be addressed before release of the software.
NASA’s 10 rules are: