Glossary · Automation software engineering and architecture
Coding standard
Also known as: Programming standard
German: Programmierrichtlinie
In software engineering, a coding standard is a set of binding rules for writing source code in a given language or project, such as MISRA C or CERT C, that restricts language features and prescribes practices to improve safety, security, reliability and maintainability, usually with a defined process for checking compliance and approving deviations.
- Software engineering
- Standards
In one sentence
A coding standard is a set of binding source code rules, such as MISRA C, with a defined process for compliance checks and deviations.
Example
The drive firmware is written to MISRA C:2012; a static analyzer checks compliance in the pipeline, and each deviation is recorded with a justification.
How it applies
- Engineering: Coding standards restrict error-prone language features, such as unchecked pointer arithmetic or dynamic memory use, and make behavior more predictable. They are widely used for embedded and safety-related software.
- Functional safety and security: IEC 61508 part 3 calls for the use of coding standards for safety-related software, and secure development practices under IEC 62443-4-1 include secure coding rules. Following a coding standard supports, but does not by itself establish, safety or security.
- Documentation: Record which coding standard and version apply, how compliance is checked, the tool configuration and every approved deviation with its rationale. These records are part of the verification evidence.
Coding standard vs. coding guideline
A coding standard is binding and audited; a Coding guideline is usually advisory. In practice, companies often combine a published standard with an in-house guideline that adds naming and layout rules.