C Inspection checklist

advertisement
C++ CODE INSPECTION RULES
CC1 (COMPLETE)
CC2 (INCLUDES)
Verify that the code covers all the design.
Verify that includes are complete.
CC3 (INITIALIZATION) Check variable and parameter initialization:
At program initiation.
At start of every loop.
At function/procedure entry.
CC4 (CALLS) Check function call formats:
Pointers
Parameters
Use of "&".
CC5 (NAMES) Check name spelling and use:
Is it consistent
Is it within the declared scope
Do all structures and classes use “.” Reference ?
CC6 (STRINGS) Check that all strings are:
Identified by pointers, and
Terminated in NULL
CC7 (POINTERS) Check that:
Pointers are initialized NULL,
Pointers are deleted only after new, and
New pointers always deleted after use.
CC8 (OUTPUT FORMAT) Check the output format:
Line stepping is proper.
Spacing is proper.
CC9 (PAIRS) Ensure the { } are proper and matched.
CC10 (LOGIC OPERATORS)
Verify that the proper use of ==, =, //, and so on.
Check every logic function for proper ( }.
CC12 (SYNTAX) Check every LOC for:
Instruction syntax
Proper punctuation.
CC 13 (STANDARDS) Ensure the code conforms to the coding standards. 1
CC14 (FILE OPEN AND CLOSE) Verify that all files are:
Properly declared
Opened, and
Closed.
1
C Style Guide: http://www.cs.umd.edu/users/cml/cstyle/ .
Download