[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GNU-COBOL] standards & practices



I have some comments on this.  If you have concerns about my modifications,
please mail me directly.  Chad, there are a few questions, please clarify to
the list.

Chad Slaughter (slaught@umr.edu) wrote:>
> Since there seem to be confusion on the coding standards.
> I have written up a short description of the stds for this project.
> For clarification more rules will be added as needed.
> the file is CVS:Cobol/doc/dev/std_prc
> 
> The Cobol Project Standards and Practices.
> 
> 1) All code will be Readable and Maintainable.
> 
	This means using meaningful variable names and writing code that
should leave no doubt as to is purpose, return value, or meaning.

> 2) All code will compile under the GNU cc compiler with no warnings or
>    errors using the following flags: -Wall 
>    The following flags are HIGHLY suggested, if you use them and get a
>    warning a technical justification will be required.
>    Extras: -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
> 
> 3) Any code that uses heap memory will need to be linked against a memory
>    leak detection package(such as dmalloc) and run with no leaks.
> 
	I consider this optional unless it can be shown to be a major problem
by not using it.

> 4) All code will have comprehensive unit tests written for it.
>    All tests written will be come part of the codes complete regression
>    test suite. All tests will pass all unit tests, BEFORE it is allowed
>    in CVS. 
>   
	An example or more specific directions would be useful here as I 
don't know how many people have done this.  I know I haven't and wouldn't
know where to begin writing these tests.
	Chad?

> 5) All C code will be Ansi & Posix compliant. except no using trigraphs.
>    All Java & NetRexx code will be Java 1.1 compliant.
> 
> 6) Naming for all externally visible entities in runtime and outputted
>    code will be prefixed With "Cobol<libraryname>__" 
>    Note: That is Two(2) underscores after the prefix.
> 
> 7) As the issue was brought. I see no conflict between the GNU coding standard
>    and the first rule.
> 
> 7a) 18 - Code formatting beyond 80 columns and needs to be "folded" 
>    Rewrite the code so "folding" isn't necessary.

	You don't need to rewrite the code to disallow folding.  Please keep
it under 80 columns wide and fold where necessary.

> 7b) 20 - All pointer declaration need to be on a line by them self.
>    Ex:  char * one, *two;   /* this is a no-no */
>         /* better way */
>         char *one;
>         char *two;
> 7c) 21 -  variable names.
>    It suggests the use of underscores as separators in C. BUT
>    Variable names should use mixed case, instead of underscores.
> 
	What?  This is not at all clear.
	Chad?

-- 
   .. Laura Tweedy .. tweedy@umr.edu ..
"Be well, do good work, and keep in touch."

--
This message was sent through the gnu-cobol mailing list.  To remove yourself
from this mailing list, send a message to gnu-cobol@acm.cs.umr.edu with the
words "unsubscribe gnu-cobol" in the message body.  For more information on
the GNU COBOL project, send mail to gnu-cobol-owner@acm.cs.umr.edu.