Skip to content

Commit

Permalink
feat(coding_guidelines): add C lang intro and scaffold
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Martins <[email protected]>
  • Loading branch information
josecm committed Jun 17, 2023
1 parent 315fc29 commit ec00050
Showing 1 changed file with 65 additions and 7 deletions.
72 changes: 65 additions & 7 deletions source/development/coding_style.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,69 @@
Coding Guidelines
=================

This document specifies a set of coding guidelines including code style,
formatting and file structuring and organization that shall be applied when
contributing code to the Bao project. We strive so that most of the guidelines
can be automatically checked or even enforced by the CI pipeline and try to
minimize guidelines which can not be automatically addressed. However, in the
few instances this is not possible, responsibility falls upon code reviewers
and maintainers to uphold these guidelines are applied as much as possible.
This document specifies a set of coding guidelines, including code style,
formatting, file structuring and organization that shall be applied when
contributing code to the Bao project. We strive to ensure that most of the
guidelines can be automatically checked or even enforced by the CI pipeline and
minimize guidelines that can not be automatically addressed. In cases where it
is not feasible to automatically enforce certain guidelines, the responsibility
lies with the code reviewers and maintainers to ensure that these guidelines
are adhered to as closely as possible.

C Language
----------

The coding style and guidelines for C development are heavily influenced and
constrained by the MISRA C:2012 guidelines, which should take precedence above
all others in this document or elsewhere.

Compiler Configuration
**********************

Directory and file Structure
****************************

Pre-processor directives and macros
***********************************

Header Files
************

Variable Declarations, Qualifiers and Initializations
*****************************************************

Functions
*********

Statements
**********

Expressions
***********

Literals
********

Identifiers and Naming
**********************

Inline Assembly
***************

Compiler Directives, Intrinsic and Attributes
**********************************************

Assertion, Error Handling and Sanity checking
*********************************************

Comments, Documentation and License
***********************************

Coding Style and Formatting
***************************

Keyword Usage
*************

Libraries and Headers
*********************

0 comments on commit ec00050

Please sign in to comment.