Coder Social home page Coder Social logo

Comments (6)

jphickey avatar jphickey commented on August 16, 2024

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.

jphickey avatar jphickey commented on August 16, 2024

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.

jphickey avatar jphickey commented on August 16, 2024

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.

jphickey avatar jphickey commented on August 16, 2024

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.

jphickey avatar jphickey commented on August 16, 2024

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.

jphickey avatar jphickey commented on August 16, 2024

Note - issues #109 and #110 are for the items noted above but not fixed in PR #98

from cf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.