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

Function names differing only by trailing underscore #110

Closed
jphickey opened this issue Dec 9, 2021 · 2 comments · Fixed by #152
Closed

Function names differing only by trailing underscore #110

jphickey opened this issue Dec 9, 2021 · 2 comments · Fixed by #152
Milestone

Comments

@jphickey
Copy link
Contributor

jphickey commented Dec 9, 2021

CF has a number of cases where function names differ only in a trailing underscore(s), which is likely to violate some coding standards because they look too similar and can be easily confused. An example offender is CF_CFDP_TxFile(), CF_CFDP_TxFile_(), and CF_CFDP_TxFile__().

These internal helpers with only trailing underscores should be renamed to something more descriptive to make it clear what the intent of the function really is (e.g. in the example, the double-underscore version seems to be simply a wrapper to initialize the transaction structure ... seems to have nothing to do with sending files at all, really - just a generic initialization helper).

@jphickey
Copy link
Contributor Author

jphickey commented Dec 9, 2021

This was originally noted in #42 but split to a separate work item

@jphickey
Copy link
Contributor Author

jphickey commented Jan 6, 2022

After PR #137 (which fixes a few) the following name issues remain:

CF_CFDP_CycleTx_
CF_CFDP_TxFile_
CF_CFDP_PlaybackDir_
CF_DoSuspRes_
CF_CmdCancel_
CF_CmdAbandon_
CF_FindTransactionBySequenceNumber_
CF_TraverseAllTransactions_

jphickey added a commit to jphickey/CF that referenced this issue Jan 6, 2022
Renames all remaining identifiers that did not have an appropriate
name per the coding standards.  Specifically, this is anything
that did not start with CF prefix (nasa#149) and anything that
ended with an underscore only (nasa#110).
jphickey added a commit to jphickey/CF that referenced this issue Jan 6, 2022
Renames all remaining identifiers that did not have an appropriate
name per the coding standards.  Specifically, this is anything
that did not start with CF prefix (nasa#149) and anything that
ended with an underscore only (nasa#110).
jphickey added a commit to jphickey/CF that referenced this issue Jan 11, 2022
Renames all remaining identifiers that did not have an appropriate
name per the coding standards.  Specifically, this is anything
that did not start with CF prefix (nasa#149) and anything that
ended with an underscore only (nasa#110).
jphickey added a commit to jphickey/CF that referenced this issue Jan 11, 2022
Renames all remaining identifiers that did not have an appropriate
name per the coding standards.  Specifically, this is anything
that did not start with CF prefix (nasa#149) and anything that
ended with an underscore only (nasa#110).
astrogeco added a commit that referenced this issue Jan 12, 2022
@skliper skliper added this to the Draco milestone Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants