Skip to content
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

cFS-Caelum Review, CFS-43: Table Services & Time Services #1420

Closed
wants to merge 4 commits into from

Conversation

astrogeco
Copy link
Contributor

Description

This is a "bookkeeping" Pull Request meant for the cFS-Caelum Review code inspection (full-scale code review).

This PR is solely focused on "CFS-43". For more info see this readme

The Included files are

# Table (TBL)
!modules/core_api/fsw/inc/cfe_tbl*

!modules/tbl/fsw/**
!modules/tbl/CMakeLists.txt

# Time Services (TIME)
!modules/core_private/fsw/inc/cfe_time*
!modules/core_api/fsw/inc/cfe_time*

!modules/time/fsw/**
!modules/time/CMakeLists.txt

Objectives

  1. This review starts on 04/26/2021 and ends on 04/30/2021.

  2. Dispositions of findings is on 05/03/2021.

  3. Reviewers only need to review source files, header files & build files.

  4. Use .ppt, .pdf, .txt & .xlsx files for background information about the code.

  5. See the Attachments section for Peer Review Data Package.

  6. See also "The Power of 10" rules for safety-critical code. https://en.wikipedia.org/wiki/The_Power_of_10:_Rules_for_Developing_Safety-Critical_Code#:~:text=The%20Power%20of%2010%20Rules,to%20review%20or%20statically%20analyze

  7. NOTE: Don't spend too much time over coding standard violations. The Static Code Analysis tool will enforce the coding standards. This code is developed by GSFC, so GSFC coding standards will be enforced for this code base.

Notes

Note a few already existing issues (no need to individually comment on occurrences):

Doxygen event documentation doesn't match code: #508
End of function comments out of date (generalized/paraphrased version of #275)
Update code/unit tests to use CFE_Status_t: #921

If there's anything else that is observed as a repeated pattern, feel free to document as a general comment

There are several places that would trigger warnings with some common compilers/warning options. It would be nice to follow #10 rule in "The Power of 10".

Quick summary/references for currently enforced settings on the FSW
Compiler options (note -Wall and -Werror) -

add_compile_options(
-std=c99 # Target the C99 standard (without gcc extensions)
-pedantic # Issue all the warnings demanded by strict ISO C
-Wall # Warn about most questionable operations
-Wstrict-prototypes # Warn about missing prototypes
-Wwrite-strings # Warn if not treating string literals as "const"
-Wpointer-arith # Warn about suspicious pointer operations
-Wcast-align # Warn about casts that increase alignment requirements
-Werror # Treat warnings as errors (code should be clean)
)

cppcheck -

cppcheck_common_opts="--force --inline-suppr --std=c99 --language=c --enable=warning,performance,portability,style --suppress=variableScope --inconclusive"

CodeQL -

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: c
queries: +security-extended, security-and-quality

CodeSonar - currently using default set for cFE, extending to JPL and MISRA is future work

For CodeQL and CodeSonar we don't eliminate all warnings, but we do analyze and disposition them all (plan to report dispositions as part of certification package)

This approach is compliant with the latest GSFC 582 standard (that is still going through review). Happy to discuss any additional settings that you have concerns about.

@skliper skliper changed the title CFS-43: Table Services & Time Services cFS-Caelum Review, CFS-43: Table Services & Time Services Apr 26, 2021
@skliper
Copy link
Contributor

skliper commented May 5, 2021

Review closed as of 5/5, for any new review comments open a new issue.

@skliper skliper closed this May 5, 2021
@skliper skliper added the review label Sep 24, 2021
@astrogeco astrogeco deleted the caelum-code-review-cfs43 branch January 24, 2022 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants