Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prepare public header for release

I'm interested in hearing what routines you have for cleaning up public header files you distribute to customers.

Some things I'd like to hear your opinions on are:

Comments not meant for external consumption. Generally I like keeping documentation close to the code and comments like this might not be a good idea to share:

/**
 * @todo Should we change the signature of this function to
 * make it obvious that xxx is really yyy?
 */

or perhaps:

/**
 * @todo Add support for feature X
 */

Inconsistent tab styles:

void functionA(int a, 
     int b,
     int c,
     int d);

void functionB(int a,
               int b,
               int c);

Are there any tools for preparing headers or code in general for release?

like image 560
Laserallan Avatar asked Jun 05 '09 11:06

Laserallan


2 Answers

You should ALWAYS, on any project involving multiple developers for any extended period of time and the subsequent release of that source code, SCAN FOR OBSCENITIES (and other things you shouldn't have said, e.g., "My boss made me do this", "This code is terrible", etc). Also, spell-checking the comments can be helpful, as people incorrectly spelling words saps from your credibility.

like image 107
GWLlosa Avatar answered Oct 21 '22 00:10

GWLlosa


Please make sure that your headers don't generate any compiler warnings.

like image 40
Paul Mitchell Avatar answered Oct 21 '22 00:10

Paul Mitchell