.TH "md_doc_api_review_core_keyNew" 3elektra "Sat Jun 5 2021" "Version 0.9.6" "Elektra" \" -*- nroff -*-
.ad l
.nh
.SH NAME
md_doc_api_review_core_keyNew \- keyNew 

.IP "\(bu" 2
start = 2021-02-14 02:55
.IP "\(bu" 2
end = 2021-02-14 03:22
.IP "\(bu" 2
reviewer = Stefan Hanreich stefanhani@gmail.com
.PP
.SH "Signature"
.PP
\fCKey *keyNew(const char *keyname, \&.\&.\&.)\fP
.SH "Checklist"
.PP
.SS "Doxygen"
(bullet points are in order of appearance)
.PP
.IP "\(bu" 2
[x] First line explains briefly what the function does
.IP "\(bu" 2
[x] Simple example or snippet how to use the function
.IP "\(bu" 2
[ ] Longer description of function containing common use cases 
.br
.IP "  \(bu" 4
[ ] is 0 a valid name? returns NULL if 0 is param
.PP

.IP "\(bu" 2
[x] Description of functions reads nicely
.IP "\(bu" 2
[ ] \fC@pre\fP 
.br
.IP "  \(bu" 4
[ ] 
.PP
\fBPrecondition\fP
.RS 4
name must be a valid key name
.RE
.PP

.PP

.IP "\(bu" 2
[ ] \fC@post\fP 
.br
.IP "  \(bu" 4
[ ] 
.PP
\fBPostcondition\fP
.RS 4
returns a valid key object
.RE
.PP

.PP

.IP "\(bu" 2
[ ] \fC@invariant\fP 
.br
.IP "  \(bu" 4
[ ] add
.PP

.IP "\(bu" 2
[ ] \fC@param\fP for every parameter 
.br
.IP "  \(bu" 4
[ ] add \fC@param\fP for \fC\&.\&.\&.\fP
.PP

.IP "\(bu" 2
[x] \fC@return\fP / \fC@retval\fP
.IP "\(bu" 2
[ ] \fC@since\fP 
.br
.IP "  \(bu" 4
[ ] add
.PP

.IP "\(bu" 2
[x] \fC@ingroup\fP
.IP "\(bu" 2
[x] \fC@see\fP
.PP
.SS "Naming"
.IP "\(bu" 2
[x] Abbreviations used in function names must be defined in the \fBGlossary\fP
.IP "\(bu" 2
[x] Function names should neither be too long, nor too short
.IP "\(bu" 2
[x] Function name should be clear and unambiguous
.IP "\(bu" 2
[x] Abbreviations used in parameter names must be defined in the \fBGlossary\fP
.IP "\(bu" 2
[x] Parameter names should neither be too long, nor too short
.IP "\(bu" 2
[x] Parameter names should be clear and unambiguous
.PP
.SS "Compatibility"
(only in PRs)
.PP
.IP "\(bu" 2
\fBSymbol versioning\fP is correct for breaking changes
.IP "\(bu" 2
ABI/API changes are forward-compatible (breaking backwards-compatibility to add additional symbols is fine)
.PP
.SS "Parameter & Return Types"
.IP "\(bu" 2
[x] Function parameters should use enum types instead of boolean types wherever sensible
.IP "\(bu" 2
[x] Wherever possible, function parameters should be \fCconst\fP
.IP "\(bu" 2
[x] Wherever possible, return types should be \fCconst\fP
.IP "\(bu" 2
[x] Functions should have the least amount of parameters feasible
.PP
.SS "Structural Clarity"
.IP "\(bu" 2
[x] Functions should do exactly one thing 
.br
.IP "  \(bu" 4
it doesn't technically - but its a convenience function
.PP

.IP "\(bu" 2
[x] Function name has the appropriate prefix
.IP "\(bu" 2
[x] Order of signatures in kdb\&.h\&.in is the same as Doxygen
.IP "\(bu" 2
[x] No functions with similar purpose exist
.PP
.SS "Memory Management"
.IP "\(bu" 2
[x] Memory Management should be handled by the function wherever possible
.PP
.SS "Extensibility"
.IP "\(bu" 2
[x] Function is easily extensible, e\&.g\&., with flags
.IP "\(bu" 2
[ ] Documentation does not impose limits, that would hinder further extensions 
.br
.IP "  \(bu" 4
[ ] Docs say \fCKey *k = keyNew(0);\fP has same effect as \fCKey *k =keyNew('', KEY_END);\fP
.PP

.PP
.SS "Tests"
.IP "\(bu" 2
[x] Function code is fully covered by tests
.IP "\(bu" 2
[x] All possible error states are covered by tests
.IP "\(bu" 2
[ ] All possible enum values are covered by tests 
.br
.IP "  \(bu" 4
[ ] KEY_META 
.br

.IP "  \(bu" 4
[ ] KEY_FLAGS
.PP

.IP "\(bu" 2
[ ] No inconsistencies between tests and documentation 
.br
.IP "  \(bu" 4
[ ] Documentation says i can work with \fCKey *k =keyNew('', KEY_END);\fP 
.br
 Tests say 
.br
 \fCk = keyNew ('', KEY_END); succeed_if (k == NULL, 'should be invalid'); keyDel (k);\fP 
.br

.IP "  \(bu" 4
[ ] same as above with \fCkeyNew(0)\fP
.PP

.PP
.SH "Summary"
.PP
.SH "Other Issues discovered (unrelated to function)"
.PP

