Skip to content

doc: coding guidelines: add more references to CERT-C #93639

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kartben
Copy link
Contributor

@kartben kartben commented Jul 24, 2025

Used https://wiki.sei.cmu.edu/confluence/display/c/MISRA+C%3A2012 to add references to relevant CERT-C section(s) for each MISRA-C rule, where applicable.

@kartben kartben force-pushed the coding_guidelines_cert_references branch 4 times, most recently from 304da5b to 9dfd714 Compare July 25, 2025 15:52
The misra severity is being treated as relevant to whether a guideline
should be followed or not in the context of the zephyr project.

Remove from the table, the MISRA severity can be looked up in many
public places or in the MISRA coding guielines themselves.

Signed-off-by: Anas Nashif <[email protected]>
@kartben kartben force-pushed the coding_guidelines_cert_references branch from 9dfd714 to 20bc828 Compare July 25, 2025 15:52
Used https://wiki.sei.cmu.edu/confluence/display/c/MISRA+C%3A2012 to
add references to relevant CERT-C section(s) for each MISRA-C rule,
where applicable.

Signed-off-by: Benjamin Cabé <[email protected]>
@kartben kartben force-pushed the coding_guidelines_cert_references branch from 20bc828 to 5476ccb Compare July 25, 2025 16:35
@kartben kartben marked this pull request as ready for review July 25, 2025 16:38
Copy link


.. _MisraC_Rule_10_5:
* - 63
- The value of an expression should not be cast to an inappropriate essential type
- `Rule 10.5 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_10_05.c>`_
- N/A
- `INT02-C <https://wiki.sei.cmu.edu/confluence/display/c/INT02-C.+Understand+integer+conversion+rules>`_
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link doesn't reference rule 10.5

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@keith-zephyr Uh, that is unfortunate. The reason I linked to this one is because the wiki page I used as a reference was initially pointing to EXP14-C but then its page says its deprecated and superseded by INT02-C :|

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe link to both for the moment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that probably makes sense. I will be on vacation so feel free to directly edit my branch. Or I can also fix up later if it's considered acceptable to merge as-is for now. Thanks for paying attention! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants