The Trusted Firmware follows the [[ https://www.misra.org.uk/Activities/MISRAC/tabid/160/Default.aspx | MISRA C:2012 coding guidelines ]]. Coverity
Static Analysis is used regularly to generate a report of current defects and
prevent the addition of new ones.
It is not possible for this project to follow all guidelines. The attached
spreadsheet lists all rules and whether the TF aims to comply with them or
not, along with the rationale for each deviation. Note that enforcing a rule
doesn't mean that the codebase is free of defects of that rule, only that
ideally they would be removed.
Note that third-party libraries are not considered in the report (MbedTLS and
libfdt) and we don't intend to fix any defects found in them.
During 2017-2018 there has been an effort to cleanup the codebase of defects,
specially in all code used by BL31 (which is prioritary as it contains all
runtime code)TF-A follows the MISRA C:2012 coding guidelines. The cleanup has been done mainly in common code and Arm
platforms.However, No fixes are done toit is not possible for third-party platforms,s project to follow all guidelines. that is the
responsibility of the maintainers.The following page lists all rules and whether the TF-A project aims to comply with them or not, Further efforts will be done inalong with the future in
thrationale form of general codebase refactoring each deviation.
The following graph shows the progress of the MISRA compliance work over thehttps://trustedfirmware-a.readthedocs.io/en/latest/process/coding-style.html#misra-compliance
last year and a half:{F24197}
{F226138}