solarcaratuva / Rivanna2

Embedded system code for Rivanna 2
5 stars 1 forks source link

Pick a coding standard and linter #13

Closed NripeshManandhar closed 3 years ago

NripeshManandhar commented 3 years ago

Coding Standards:

Linters:

After picking a coding standard, set up a linter and integrate it with CircleCI

willzhang05 commented 3 years ago

https://www.misra.org.uk/LinkClick.aspx?fileticket=n7HwIG-0JYk%3D&tabid=59 https://www.reddit.com/r/cpp/comments/ehjht3/the_merger_of_misra_c_and_autosar_c_a_roundtable/

Looks like MISRA + AUTOSAR are going to be merged standards as of 2019. JSF is more for air vehicles, so this is a pretty easy choice to go with MISRA + AUTOSAR, but the merged standards aren't published yet. MISRA C++ seems too restrictive, since AUTOSAR allows for use of C++14 features, but no good free linters available for checking it.

Non-free linters:

https://www.autosar.org/fileadmin/user_upload/standards/adaptive/17-03/AUTOSAR_RS_CPP14Guidelines.pdf

willzhang05 commented 3 years ago

Out of date: https://github.com/rettichschnidi/clang-tidy-misra Could be good https://github.com/facebook/infer

I like clang-tidy and some student has seemingly integrated AUTOSAR checking into clang-tidy? https://summerofcode.withgoogle.com/archive/2020/projects/6056658263867392/