
\begin{DoxyItemize}
\item start = 2021-\/02-\/22 13\+:40
\item end = 2021-\/02-\/22 14\+:20
\item moderator = Stefan Hanreich \href{mailto:stefanhani@gmail.com}{\tt stefanhani@gmail.\+com}
\item reviewer = Philipp Gackstatter
\end{DoxyItemize}

{\ttfamily ssize\+\_\+t \hyperlink{group__keyname_gab29a850168d9b31c9529e90cf9ab68be}{key\+Get\+Name(const Key $\ast$key, char $\ast$returned\+Name, size\+\_\+t max\+Size)}}

(bullet points are in order of appearance)


\begin{DoxyItemize}
\item \mbox{[} \mbox{]} First line explains briefly what the function does
\begin{DoxyItemize}
\item \mbox{[} \mbox{]} owner still recent?
\end{DoxyItemize}
\item \mbox{[} \mbox{]} Simple example or snippet how to use the function
\begin{DoxyItemize}
\item \mbox{[} \mbox{]} move up
\end{DoxyItemize}
\item \mbox{[} \mbox{]} Longer description of function containing common use cases
\begin{DoxyItemize}
\item \mbox{[} \mbox{]} max\+Size special case has very long description ($>$50\% of body)
\item \mbox{[} \mbox{]} max\+Size special case move description to pre / post / return values
\item \mbox{[} \mbox{]} mention explicitly, that user has to manage their buffer
\item \mbox{[} \mbox{]} move special case \textquotesingle{}not enough space\textquotesingle{} to return values / pre / post
\end{DoxyItemize}
\item \mbox{[} \mbox{]} Description of functions reads nicely
\begin{DoxyItemize}
\item \mbox{[} \mbox{]} remove / define abbreviated (make it more explicit)
\item \mbox{[} \mbox{]} \char`\"{}\+Writes key\+Name of `key` into the provided buffer `returned\+Name` if it is shorter than `max\+Size`\char`\"{}
\end{DoxyItemize}
\item \mbox{[} \mbox{]} {\ttfamily @pre}
\begin{DoxyItemize}
\item \mbox{[} \mbox{]} {\ttfamily key} is a valid Key
\item \mbox{[} \mbox{]} {\ttfamily returned\+Name} is a pre-\/allocated buffer
\item \mbox{[} \mbox{]} max\+Size is the size of {\ttfamily returned\+Name}
\end{DoxyItemize}
\item \mbox{[} \mbox{]} {\ttfamily @post}
\begin{DoxyItemize}
\item \mbox{[} \mbox{]} {\ttfamily returned\+Name} contains the name of the Key
\item \mbox{[} \mbox{]} {\ttfamily key} is not modified
\end{DoxyItemize}
\item \mbox{[} \mbox{]} {\ttfamily @invariant}
\begin{DoxyItemize}
\item \mbox{[} \mbox{]} {\ttfamily key} is not modified
\end{DoxyItemize}
\item \mbox{[} \mbox{]} {\ttfamily @param} for every parameter
\begin{DoxyItemize}
\item \mbox{[} \mbox{]} {\ttfamily returned\+Name}\+: pre-\/allocated buffer to write the key name into
\end{DoxyItemize}
\item \mbox{[} \mbox{]} {\ttfamily @return} / {\ttfamily @retval}
\begin{DoxyItemize}
\item \mbox{[} \mbox{]} {\ttfamily 1}\+: when only a null-\/terminator was written
\item \mbox{[} \mbox{]} {\ttfamily -\/1}\+: then -\/$>$ than
\item \mbox{[} \mbox{]} {\ttfamily -\/1}\+: standardize / change \textquotesingle{}keyname\textquotesingle{} / \textquotesingle{}key name\textquotesingle{} or \textquotesingle{}Key name\textquotesingle{}
\item \mbox{[} \mbox{]} {\ttfamily -\/1} check if null pointer case is even still applicable
\item \mbox{[} \mbox{]} {\ttfamily -\/1} split into two lines\+: max\+Size / N\+U\+LL pointer
\end{DoxyItemize}
\item \mbox{[} \mbox{]} {\ttfamily @since}
\begin{DoxyItemize}
\item \mbox{[} \mbox{]} add
\end{DoxyItemize}
\item \mbox{[}x\mbox{]} `{\ttfamily }
\item {\ttfamily \mbox{[} \mbox{]}}\begin{DoxySeeAlso}{See also}
`
\begin{DoxyItemize}
\item \mbox{[} \mbox{]} \hyperlink{group__keyname_ga8e805c726a60da921d3736cda7813513}{key\+Name}
\item \mbox{[} \mbox{]} \hyperlink{group__keyname_ga44a576c7919d5b03f28d3ed3afaa7cd1}{key\+Get\+Unescaped\+Name}
\item \mbox{[} \mbox{]} \hyperlink{group__keyname_ga0992d26bcfca767cb8e77053a483eb64}{key\+Get\+Base\+Name}
\item \mbox{[} \mbox{]} \hyperlink{group__keyname_gafc3ca03ed10f87eb59bdc02cf2a0de8d}{key\+Get\+Namespace}
\end{DoxyItemize}
\end{DoxySeeAlso}

\end{DoxyItemize}


\begin{DoxyItemize}
\item Abbreviations used in function names must be defined in the \hyperlink{doc_help_elektra-glossary_md}{Glossary}
\item \mbox{[}x\mbox{]} Function names should neither be too long, nor too short
\item \mbox{[} \mbox{]} Function name should be clear and unambiguous
\begin{DoxyItemize}
\item \mbox{[} \mbox{]} {\ttfamily key\+Name} vs {\ttfamily \hyperlink{group__keyname_gab29a850168d9b31c9529e90cf9ab68be}{key\+Get\+Name()}}
\end{DoxyItemize}
\item \mbox{[} \mbox{]} Abbreviations used in parameter names must be defined in the \hyperlink{doc_help_elektra-glossary_md}{Glossary}
\begin{DoxyItemize}
\item \mbox{[} \mbox{]} max -\/ maybe just rename to {\ttfamily buffer\+Size}
\end{DoxyItemize}
\item \mbox{[} \mbox{]} Parameter names should neither be too long, nor too short
\begin{DoxyItemize}
\item \mbox{[} \mbox{]} {\ttfamily returned\+Name} -\/$>$ {\ttfamily name} / {\ttfamily name\+Buffer}
\end{DoxyItemize}
\item \mbox{[} \mbox{]} Parameter names should be clear and unambiguous
\begin{DoxyItemize}
\item \mbox{[} \mbox{]} {\ttfamily max\+Size} -\/$>$ {\ttfamily buffer\+Size}
\end{DoxyItemize}
\end{DoxyItemize}

(only in P\+Rs)


\begin{DoxyItemize}
\item \hyperlink{doc_dev_symbol-versioning_md}{Symbol versioning} is correct for breaking changes
\item A\+B\+I/\+A\+PI changes are forward-\/compatible (breaking backwards-\/compatibility to add additional symbols is fine)
\end{DoxyItemize}


\begin{DoxyItemize}
\item Function parameters should use enum types instead of boolean types wherever sensible
\item \mbox{[}x\mbox{]} Wherever possible, function parameters should be {\ttfamily const}
\item \mbox{[}x\mbox{]} Wherever possible, return types should be {\ttfamily const}
\item \mbox{[}x\mbox{]} Functions should have the least amount of parameters feasible
\end{DoxyItemize}


\begin{DoxyItemize}
\item \mbox{[}x\mbox{]} Functions should do exactly one thing
\item \mbox{[}x\mbox{]} Function name has the appropriate prefix
\item \mbox{[} \mbox{]} Order of signatures in kdb.\+h.\+in is the same as Doxygen
\begin{DoxyItemize}
\item wrong order
\end{DoxyItemize}
\item \mbox{[}x\mbox{]} No functions with similar purpose exist
\end{DoxyItemize}


\begin{DoxyItemize}
\item \mbox{[} \mbox{]} Memory Management should be handled by the function wherever possible
\begin{DoxyItemize}
\item \mbox{[} \mbox{]} pass variable and return size instead
\item \mbox{[} \mbox{]} remove {\ttfamily max\+Size} param
\end{DoxyItemize}
\end{DoxyItemize}


\begin{DoxyItemize}
\item \mbox{[}x\mbox{]} Function is easily extensible, e.\+g., with flags
\item \mbox{[} \mbox{]} Documentation does not impose limits, that would hinder further extensions
\begin{DoxyItemize}
\item \mbox{[} \mbox{]} nothing is written on max\+Size $<$ name\+Size (would be fixed with memory management suggestion from above)
\end{DoxyItemize}
\end{DoxyItemize}


\begin{DoxyItemize}
\item \mbox{[} \mbox{]} Function code is fully covered by tests
\begin{DoxyItemize}
\item Lines 365 / 366
\end{DoxyItemize}
\item \mbox{[} \mbox{]} All possible error states are covered by tests
\begin{DoxyItemize}
\item test empty string
\end{DoxyItemize}
\item All possible enum values are covered by tests
\item \mbox{[}x\mbox{]} No inconsistencies between tests and documentation
\end{DoxyItemize}

Different error codes for different errors