Closed Joshua-Anderson closed 1 year ago
Very good idea! Particularly since some of your rules make reference to MISRA-C. Some of our quality engineers enjoy "bugging" us to follow MISRA-C (2004) guidelines.
This would reassure the various stakeholders' quality engineers, who may be hesitant if internationally recognized coding rules are not followed.
I discovered C++ rules on the NASA Technical Reports Server. You don't consider them because they come from another center, are in draft status, and are out of date?
Is the JPL working on writing coding rules for the C++ language?
If so, do you use the MISRA C++ rules, the ESA C++ rules, or the Lockheed Martin JSR AV C++ rules?
This is done!
Feature Description
JPL's Institutional Coding Standards for C is an institution wide standard for C code. While JPL has no C++ coding standard, many of the C coding standard requirements (no memory allocation outside of initialization, no recursion, etc) can be adapted to C++ projects like F'.
Requirements from the JPL C coding standard requirements that apply to C++ projects should be selected and F' should be audited for requirement compliance.
We should consider using static analysis to audit for and possible enforce compliance with the JPL C coding guidelines.
GitHub has open source CodeQL scripts for most JPL coding standard and power of ten rules available here. We could use these rules with github actions code scanning or custom LGTM analysis scripts. My first glance over the CodeQL scripts revealed that many of them are VxWorks specific and may require refactoring to work with F'