\label{doc_api_review_core_keyDup_md_md_doc_api_review_core_keyDup}%
\Hypertarget{doc_api_review_core_keyDup_md_md_doc_api_review_core_keyDup}%

\begin{DoxyItemize}
\item start = 2021-\/02-\/20 18\+:10
\item end = 2021-\/02-\/20 18\+:35
\item moderator = Stefan Hanreich \href{mailto:stefanhani@gmail.com}{\texttt{ stefanhani@gmail.\+com}}
\end{DoxyItemize}\hypertarget{doc_api_review_core_keyDup_md_autotoc_md810}{}\doxysection{Signature}\label{doc_api_review_core_keyDup_md_autotoc_md810}
{\ttfamily Key $\ast$key\+Dup(const Key $\ast$source)}\hypertarget{doc_api_review_core_keyDup_md_autotoc_md811}{}\doxysection{Checklist}\label{doc_api_review_core_keyDup_md_autotoc_md811}
\hypertarget{doc_api_review_core_keyDup_md_autotoc_md812}{}\doxysubsubsection{Doxygen}\label{doc_api_review_core_keyDup_md_autotoc_md812}
(bullet points are in order of appearance)


\begin{DoxyItemize}
\item \mbox{[} \mbox{]} First line explains briefly what the function does ~\newline

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} could be a bit more specific
\end{DoxyItemize}
\item \mbox{[} \mbox{]} Simple example or snippet how to use the function ~\newline

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} remove the wrapping function as it only distracts
\end{DoxyItemize}
\item \mbox{[} \mbox{]} Longer description of function containing common use cases ~\newline

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} be a bit more explicit
\end{DoxyItemize}
\item \mbox{[} \mbox{]} Description of functions reads nicely ~\newline

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} \char`\"{}\+Like for a new key\char`\"{} could be formulated better
\end{DoxyItemize}
\item \mbox{[} \mbox{]} {\ttfamily @pre} ~\newline

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} \begin{DoxyPrecond}{Precondition}
source must be a valid key
\end{DoxyPrecond}

\end{DoxyItemize}
\item \mbox{[} \mbox{]} {\ttfamily @post} ~\newline

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} \begin{DoxyPostcond}{Postcondition}
returns a full copy of the key including all info (metadata, ..)
\end{DoxyPostcond}

\end{DoxyItemize}
\item \mbox{[} \mbox{]} {\ttfamily @invariant} ~\newline

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} \begin{DoxyInvariant}{Invariant}
source stays a valid key
\end{DoxyInvariant}

\end{DoxyItemize}
\item \mbox{[}x\mbox{]} {\ttfamily @param} for every parameter
\item \mbox{[}x\mbox{]} {\ttfamily @return} / {\ttfamily @retval}
\item \mbox{[} \mbox{]} {\ttfamily @since} ~\newline

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} add
\end{DoxyItemize}
\item \mbox{[}x\mbox{]} {\ttfamily @ingroup}
\item \mbox{[} \mbox{]} {\ttfamily @see} ~\newline

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} {\ttfamily \mbox{\hyperlink{group__key_ga505575ebef060066984fe0f590081e37}{key\+Copy()}}}
\end{DoxyItemize}
\end{DoxyItemize}\hypertarget{doc_api_review_core_keyDup_md_autotoc_md813}{}\doxysubsection{Naming}\label{doc_api_review_core_keyDup_md_autotoc_md813}

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} Abbreviations used in function names must be defined in the \mbox{\hyperlink{doc_help_elektra-glossary_md}{Glossary}} ~\newline

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} add dup to glossary
\end{DoxyItemize}
\item \mbox{[}x\mbox{]} Function names should neither be too long, nor too short
\item \mbox{[}x\mbox{]} Function name should be clear and unambiguous
\item Abbreviations used in parameter names must be defined in the \mbox{\hyperlink{doc_help_elektra-glossary_md}{Glossary}}
\item \mbox{[}x\mbox{]} Parameter names should neither be too long, nor too short
\item \mbox{[}x\mbox{]} Parameter names should be clear and unambiguous
\end{DoxyItemize}\hypertarget{doc_api_review_core_keyDup_md_autotoc_md814}{}\doxysubsection{Compatibility}\label{doc_api_review_core_keyDup_md_autotoc_md814}
(only in PRs)


\begin{DoxyItemize}
\item \mbox{\hyperlink{doc_dev_symbol-versioning_md}{Symbol versioning}} is correct for breaking changes
\item ABI/\+API changes are forward-\/compatible (breaking backwards-\/compatibility to add additional symbols is fine)
\end{DoxyItemize}\hypertarget{doc_api_review_core_keyDup_md_autotoc_md815}{}\doxysubsection{Parameter \& Return Types}\label{doc_api_review_core_keyDup_md_autotoc_md815}

\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}\hypertarget{doc_api_review_core_keyDup_md_autotoc_md816}{}\doxysubsection{Structural Clarity}\label{doc_api_review_core_keyDup_md_autotoc_md816}

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

\begin{DoxyItemize}
\item \mbox{[}x\mbox{]} Memory Management should be handled by the function wherever possible
\end{DoxyItemize}\hypertarget{doc_api_review_core_keyDup_md_autotoc_md818}{}\doxysubsection{Extensibility}\label{doc_api_review_core_keyDup_md_autotoc_md818}

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} Function is easily extensible, e.\+g., with flags ~\newline

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} could add flags similar to {\ttfamily \mbox{\hyperlink{group__key_ga505575ebef060066984fe0f590081e37}{key\+Copy()}}}
\end{DoxyItemize}
\item \mbox{[}x\mbox{]} Documentation does not impose limits, that would hinder further extensions
\end{DoxyItemize}\hypertarget{doc_api_review_core_keyDup_md_autotoc_md819}{}\doxysubsection{Tests}\label{doc_api_review_core_keyDup_md_autotoc_md819}

\begin{DoxyItemize}
\item \mbox{[}x\mbox{]} Function code is fully covered by tests ~\newline

\begin{DoxyItemize}
\item Error state is hard to check, cause it only appears on null pointers which gets checked in the function itself already
\end{DoxyItemize}
\item \mbox{[}x\mbox{]} All possible error states are covered by tests ~\newline

\begin{DoxyItemize}
\item see above
\end{DoxyItemize}
\item All possible enum values are covered by tests
\item \mbox{[}x\mbox{]} No inconsistencies between tests and documentation
\end{DoxyItemize}\hypertarget{doc_api_review_core_keyDup_md_autotoc_md820}{}\doxysection{Summary}\label{doc_api_review_core_keyDup_md_autotoc_md820}
\hypertarget{doc_api_review_core_keyDup_md_autotoc_md821}{}\doxysection{Other Issues discovered (unrelated to function)}\label{doc_api_review_core_keyDup_md_autotoc_md821}
