I've heard that the automotive industry has something called MISRA C.
What are the relevant standards for other high reliability/availability/security industries, such as
-Adam
Adherence to coding standards helps to ensure that your code is compliant, readable, and secure. Adopting a coding standard is important. But it means nothing if your developers don't adhere to it. Coding standards are often mandated for compliance in safety-critical industries.
Here are few examples of good coding standards related to formatting: No more than one statement per line. Line length should not exceed 80 or 100 characters. Test class must start with the name of the class they are testing followed by 'Test'.
Check out the Goddard Space Flight Center and its coding standards. One of the C standards, which I've adopted in my own code, is that headers must be self-contained, and they provide a simple way to enforce that -- a module's header must be the first file included in the module, so if the file is not self-contained, it won't compile.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With