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

Reducing cyclomatic complexity #196

Closed
jlucas9 opened this issue Aug 31, 2023 · 8 comments
Closed

Reducing cyclomatic complexity #196

jlucas9 opened this issue Aug 31, 2023 · 8 comments
Assignees
Labels
cmp NASA GSFC CMP

Comments

@jlucas9
Copy link
Collaborator

jlucas9 commented Aug 31, 2023

Need to generate cyclomatic complexity and reduce it to accommodate NASA Class B FSW standards.

@jlucas9 jlucas9 added the cmp NASA GSFC CMP label Aug 31, 2023
@jlucas9 jlucas9 self-assigned this Aug 31, 2023
@rjbrown2
Copy link
Contributor

rjbrown2 commented Oct 6, 2023

We've requested this, and static analysis through the IVV SWAT team. Have not heard back after the initial request. Provided them with the URL to the repository. Just awaiting a response. Will check back in next week if we haven't heard anything by then.

@rjbrown2
Copy link
Contributor

Touched base with SWAT again. Still awaiting setup on this.

@rjbrown6
Copy link
Contributor

Complexity format has been updated on IVV side. Readable results now. Have started a spreadsheet with these initial results. Many things are not all that complex, and should remain as they are. However, our Apply/Process functions could use some discussion.

Have put in a request with IVV to rerun our job with the latest dev branch, rather than just main. This should give us some more results.

rjbrown2 pushed a commit that referenced this issue Feb 22, 2024
rjbrown2 pushed a commit that referenced this issue Mar 5, 2024
rjbrown2 pushed a commit that referenced this issue Mar 6, 2024
rjbrown2 pushed a commit that referenced this issue Mar 6, 2024
rjbrown2 pushed a commit that referenced this issue Mar 15, 2024
rjbrown2 pushed a commit that referenced this issue Mar 15, 2024
@jlucas9
Copy link
Collaborator Author

jlucas9 commented Mar 20, 2024

These changes are getting very large. May be worth the time to slowly chunk these up into small pieces for easier merge review. Ideally different issues and merges for each section you're refactoring.

@rjbrown2
Copy link
Contributor

Will create new issues for the remaining refactors first. If we want to separate the currently refactored portions, I can do that as well.

@rjbrown2
Copy link
Contributor

rjbrown2 commented Mar 20, 2024

For additional reference, the following functions have been refactored within this issue:
crypto_tc:

  • Crypto_TC_Apply_Security_Cam
  • Crypto_TC_Process_Security_Cam

sadb_routine_inmemory_template.c:

  • sadb_get_operational_sa_from_gvcid

crypto.c:

  • Crypto_Check_Anti_Replay

cryptography_interface_lib_gcrypt_template.c:

  • cryptography_aead_encrypt
  • cryptography_validate_authentication
  • cryptography_aead_decrypto.c

base64url.c:

  • base64urlDecode

standalone.c:

  • crypto_standalone_tm_process

@rjbrown2
Copy link
Contributor

Currently, there is also some crypto_tm.c refactoring (tm_apply) - but it is not yet finished. I'm going to leave at least the one partially finished in this branch. I'll probably move the process functionality to its own branch.

rjbrown2 added a commit that referenced this issue Mar 25, 2024
rjbrown2 added a commit that referenced this issue Mar 25, 2024
rjbrown2 pushed a commit that referenced this issue Mar 26, 2024
rjbrown2 pushed a commit that referenced this issue Mar 26, 2024
rjbrown2 pushed a commit that referenced this issue Mar 27, 2024
@rjbrown2
Copy link
Contributor

rjbrown2 commented Apr 4, 2024

Closing this issue as it is complete. However, for tracking purposes:
#230 #231 #228 #227 #226

@rjbrown2 rjbrown2 closed this as completed Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmp NASA GSFC CMP
Projects
Status: Done
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants