-
Notifications
You must be signed in to change notification settings - Fork 20
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
SC has significant blocks of #ifdef code #105
Comments
jphickey
added a commit
to jphickey/SC
that referenced
this issue
Sep 22, 2023
This was always set true and the software has not been validated with the option set to false. Turning this off only removed a few small functions and the complexity (and violation of coding standard) does not justify it as an option.
2 tasks
jphickey
added a commit
to jphickey/SC
that referenced
this issue
Sep 22, 2023
This was always set true and the software has not been validated with the option set to false. Turning this off only removed a few small functions and the complexity (and violation of coding standard) does not justify it as an option.
jphickey
added a commit
to jphickey/SC
that referenced
this issue
Sep 22, 2023
This was always set true and the software has not been validated with the option set to false. Turning this off only removed a few small functions and the complexity (and violation of coding standard) does not justify it as an option.
dzbaker
added a commit
that referenced
this issue
Sep 28, 2023
Fix #105, remove SC_ENABLE_GROUP_COMMANDS option
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Checklist (Please check before submitting)
Is your feature request related to a problem? Please describe.
Code that is "compiled-out" is supposed to be avoided. However, SC has significant chunks of such code, particularly inside
#if (SC_ENABLE_GROUP_COMMANDS == true)
blocks.Having blocks of disabled code makes testing difficult (it is only built one way, disabled code can't be tested) and is against current coding standards for FSW.
Ideally, functionality should be included all the time, if possible. But if the goal is to save code space necessitating code removal, then the preferred pattern is to isolate the optional implementation to completely separate source files, and have an alternate implementation of the same routines that simply return an error code that the function is not implemented.
Describe the solution you'd like
Remove
#if
and#ifdef
preprocessor statementsDescribe alternatives you've considered
Isolate functions to separate source file and do source selection in cmake
Requester Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered: