Comments (6)
Imported comment by internal user on Tue Nov 16 16:43:32 2021
CF also has a number of functions that have a trailing underscore (e.g. CF_CFDP_PlaybackDir_
) for no apparent reason. This should be corrected and the underscore removed
from cf.
Imported comment by internal user on Wed Nov 17 09:16:55 2021
In addition to above, there are also function names that differ only in the presence (or not) of a trailing underscore. For example:
CF_CFDP_FindTransactionBySequenceNumber{{ }}
CF_CFDP_FindTransactionBySequenceNumber_
The former is a global (app-wide) call, where the latter is a local helper function to implement that call. However I understand coding standards to require a greater differentiation in the function names than just a trailing underscore.
from cf.
Imported comment by internal user on Wed Nov 17 11:22:05 2021
Another specific area of concern/issue here is with regard to the "clist_node" typedef. It is defined as follows:
struct clist_node_t;
typedef struct clist_node_t
{
struct clist_node_t *next;
struct clist_node_t *prev;
} clist_node_t;
typedef struct clist_node_t *clist_node;
Typically in the CFS patterns/style the bare struct would be named "clist_node", but in this case that is a pointer typedef. In general the CFE code avoids pointer typedefs, they can be confusing - just including the "*" generally yields clearer code because its obvious the value is a pointer, and doesn't cause strangeness WRT the "const" keyword.
from cf.
Since scrubbing for adherence to the CFS conventions for naming and style is likely to be a large changeset, this should be split into several stages:
- Initial Pass thru clang-format was already done in #16 (merged)
- Each header + source file should be individually scrubbed for naming convention/scope issues.
Naming convention issues are mostly just search and replace, so little chance for unintended consequences if done properly - but they do affect many files, so unlikely to be able to merge other changes across it.
from cf.
The linked PR fixes the names of identifiers in headers, but still does not address the other issues, specifically declaring variables in the middle of functions, and internal helper functions which are not declared in headers (specifically the ones that end in underscores).
I'd like to close this issue with PR #98 and I will submit additional issues for the remaining items.
from cf.
Note - issues #109 and #110 are for the items noted above but not fixed in PR #98
from cf.
Related Issues (20)
- Fix typo in Requirement CF2002.1.3
- Various type mismatches in CF
- EDS file inconsistencies
- Should message buffers returned from `CFE_SB_ReceiveBuffer` be checked for `NULL`?
- Segfault trying to dereference NULL pointer.
- Apply name updates from recent EdsLib change
- Placing a file with a name that is too long in the polling directory causes errors to spam
- Inaccurate comment in CF_CFDP_ReceiveMessage
- cf delete file when there is an error during tx HOT 1
- Transaction priority sorted incorrectly
- Static analysis issues JSC 2.1
- Standardization of Command Responses
- EotPacket provides transaction status, but defines are internal
- f-sanitizer report run time error in coverage-cf-cf_cfdp_r-testrunner
- f-sanitizer report run time error in coverage-cf-cf_cfdp_sbintf-testrunner
- f-sanitizer report run time error in coverage-cf-cf_cfdp_s-testrunner
- f-sanitizer report run time error in coverage-cf-cf_cfdp-testrunner
- f-sanitizer report runtime error in coverage-cf-cf_cmd-testrunner
- Convert internal `0`/`1` variables to `bool` type
- How to build HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cf.