\label{doc_api_review_core_keySetName_md_md_doc_api_review_core_keySetName}%
\Hypertarget{doc_api_review_core_keySetName_md_md_doc_api_review_core_keySetName}%

\begin{DoxyItemize}
\item start = 2021-\/02-\/14 03\+:30
\item end = 2021-\/02-\/14 03\+:50
\item reviewer = Stefan Hanreich \href{mailto:stefanhani@gmail.com}{\texttt{ stefanhani@gmail.\+com}}
\end{DoxyItemize}\hypertarget{doc_api_review_core_keySetName_md_autotoc_md1180}{}\doxysection{Signature}\label{doc_api_review_core_keySetName_md_autotoc_md1180}
{\ttfamily ssize\+\_\+t \mbox{\hyperlink{group__keyname_ga7699091610e7f3f43d2949514a4b35d9}{key\+Set\+Name(\+Key $\ast$key, const char $\ast$newname)}}}\hypertarget{doc_api_review_core_keySetName_md_autotoc_md1181}{}\doxysection{Checklist}\label{doc_api_review_core_keySetName_md_autotoc_md1181}
\hypertarget{doc_api_review_core_keySetName_md_autotoc_md1182}{}\doxysubsubsection{Doxygen}\label{doc_api_review_core_keySetName_md_autotoc_md1182}
(bullet points are in order of appearance)


\begin{DoxyItemize}
\item \mbox{[}x\mbox{]} First line explains briefly what the function does
\item \mbox{[} \mbox{]} Simple example or snippet how to use the function ~\newline

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} add
\end{DoxyItemize}
\item \mbox{[} \mbox{]} Longer description of function containing common use cases
\item \mbox{[} \mbox{]} Description of functions reads nicely
\item \mbox{[} \mbox{]} {\ttfamily @pre} ~\newline

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} \begin{DoxyPrecond}{Precondition}
new\+Name must be a valid name ~\newline

\end{DoxyPrecond}

\item \mbox{[} \mbox{]} \begin{DoxyPrecond}{Precondition}
must not be a read-\/only key ~\newline

\end{DoxyPrecond}

\item \mbox{[} \mbox{]} \begin{DoxyPrecond}{Precondition}
must not have been inserted before
\end{DoxyPrecond}

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

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} \begin{DoxyPostcond}{Postcondition}
Key has (possibly modified) new\+Name as name
\end{DoxyPostcond}

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

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

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} add {\ttfamily @retval} -\/1 if key is read-\/only
\end{DoxyItemize}
\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{]} add {\ttfamily key\+Set\+Name\+Space()}
\end{DoxyItemize}
\end{DoxyItemize}\hypertarget{doc_api_review_core_keySetName_md_autotoc_md1183}{}\doxysubsection{Naming}\label{doc_api_review_core_keySetName_md_autotoc_md1183}

\begin{DoxyItemize}
\item \mbox{[}x\mbox{]} Abbreviations used in function names must be defined in the \mbox{\hyperlink{doc_help_elektra-glossary_md}{Glossary}}
\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 \mbox{[}x\mbox{]} 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_keySetName_md_autotoc_md1184}{}\doxysubsection{Compatibility}\label{doc_api_review_core_keySetName_md_autotoc_md1184}
(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_keySetName_md_autotoc_md1185}{}\doxysubsection{Parameter \& Return Types}\label{doc_api_review_core_keySetName_md_autotoc_md1185}

\begin{DoxyItemize}
\item \mbox{[}x\mbox{]} 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{[} \mbox{]} Wherever possible, return types should be {\ttfamily const} ~\newline

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} might be possible to make it {\ttfamily const}
\end{DoxyItemize}
\item \mbox{[}x\mbox{]} Functions should have the least amount of parameters feasible
\end{DoxyItemize}\hypertarget{doc_api_review_core_keySetName_md_autotoc_md1186}{}\doxysubsection{Structural Clarity}\label{doc_api_review_core_keySetName_md_autotoc_md1186}

\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 ~\newline

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} swapped with functions for unescaped
\end{DoxyItemize}
\item \mbox{[}x\mbox{]} No functions with similar purpose exist
\end{DoxyItemize}\hypertarget{doc_api_review_core_keySetName_md_autotoc_md1187}{}\doxysubsection{Memory Management}\label{doc_api_review_core_keySetName_md_autotoc_md1187}

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

\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 ~\newline

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} behavior on invalid names
\end{DoxyItemize}
\end{DoxyItemize}\hypertarget{doc_api_review_core_keySetName_md_autotoc_md1189}{}\doxysubsection{Tests}\label{doc_api_review_core_keySetName_md_autotoc_md1189}

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

\begin{DoxyItemize}
\item \mbox{[}x\mbox{]} test\+\_\+bit \char`\"{}\+CANNOT\char`\"{} fail, so might not be necessary to cover this ~\newline
 for now should be made more resistant to future changes
\end{DoxyItemize}
\item \mbox{[} \mbox{]} All possible error states are covered by tests ~\newline

\begin{DoxyItemize}
\item \mbox{[}x\mbox{]} test read-\/only keys
\end{DoxyItemize}
\item All possible enum values are covered by tests
\item \mbox{[} \mbox{]} No inconsistencies between tests and documentation ~\newline

\begin{DoxyItemize}
\item \mbox{[}x\mbox{]} \href{https://github.com/ElektraInitiative/libelektra/blob/master/tests/abi/testabi_key.c\#L357}{\texttt{ https\+://github.\+com/\+Elektra\+Initiative/libelektra/blob/master/tests/abi/testabi\+\_\+key.\+c\#\+L357}} ~\newline
 checks for -\/1 if null pointer is provided ~\newline
 documentation says 0 will be returned ~\newline

\item \mbox{[}x\mbox{]} Documentation says name will be {\ttfamily \char`\"{}\char`\"{}} after an invalid name ~\newline
 Tests show that name stays unchanged ~\newline
 \href{https://github.com/ElektraInitiative/libelektra/blob/master/tests/abi/testabi_key.c\#L601}{\texttt{ https\+://github.\+com/\+Elektra\+Initiative/libelektra/blob/master/tests/abi/testabi\+\_\+key.\+c\#\+L601}} ~\newline

\item \mbox{[}x\mbox{]} Documentations should include stripping trailing {\ttfamily /}
\end{DoxyItemize}
\end{DoxyItemize}\hypertarget{doc_api_review_core_keySetName_md_autotoc_md1190}{}\doxysection{Summary}\label{doc_api_review_core_keySetName_md_autotoc_md1190}
\hypertarget{doc_api_review_core_keySetName_md_autotoc_md1191}{}\doxysection{Other Issues discovered (unrelated to function)}\label{doc_api_review_core_keySetName_md_autotoc_md1191}
