From 074d9e0acba9544c14f0b07cd3d28a188a476aa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20LUDWIG?= Date: Sun, 25 Jun 2023 21:32:16 +0200 Subject: [PATCH] docs: fix doxygen warnings --- CONTRIBUTING.md | 32 +++++++++---------------------- Doxyfile | 5 ++++- lib/character.h | 6 ++---- lib/convert.h | 2 +- lib/hash_map.h | 3 ++- lib/string.h | 50 +++++++++++++++++++++++++++---------------------- 6 files changed, 46 insertions(+), 52 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e1382f9..1354716 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,6 +2,14 @@ Thanks a lot for your interest in contributing to **libcproject**! 🎉 +## Code of Conduct + +**libcproject** adopted the [Contributor Covenant](https://www.contributor-covenant.org/) as its Code of Conduct, and we expect project participants to adhere to it. Please read [the full text](./CODE_OF_CONDUCT.md) so that you can understand what actions will and will not be tolerated. + +## Open Development + +All work on **libcproject** happens directly on this repository. Both core team members and external contributors send pull requests which go through the same review process. + ## Types of contributions - Reporting a bug. @@ -21,26 +29,4 @@ If you're adding new features to **libcproject**, please include tests. ## Commits -The commit message guidelines respect [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional) and [Semantic Versioning](https://semver.org/) for releases. - -### Types - -Types define which kind of changes you made to the project. - -| Types | Description | -| -------- | ------------------------------------------------------------------------------------------------------------ | -| feat | A new feature. | -| fix | A bug fix. | -| docs | Documentation only changes. | -| style | Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc). | -| refactor | A code change that neither fixes a bug nor adds a feature. | -| perf | A code change that improves performance. | -| test | Adding missing tests or correcting existing tests. | -| build | Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm). | -| ci | Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs). | -| chore | Other changes that don't modify src or test files. | -| revert | Reverts a previous commit. | - -### Scopes - -Scopes define what part of the code changed. +The commit message guidelines adheres to [Conventional Commits](https://www.conventionalcommits.org/) and [Semantic Versioning](https://semver.org/) for releases. diff --git a/Doxyfile b/Doxyfile index 4ea2536..067d349 100644 --- a/Doxyfile +++ b/Doxyfile @@ -8,7 +8,10 @@ INPUT = ./ INPUT_ENCODING = UTF-8 USE_MDFILE_AS_MAINPAGE = README.md FILE_PATTERNS = *.h \ - README.md + README.md \ + CODE_OF_CONDUCT.md \ + CONTRIBUTING.md \ + LICENSE HTML_EXTRA_STYLESHEET = doxygen-awesome-css/doxygen-awesome.css RECURSIVE = YES diff --git a/lib/character.h b/lib/character.h index 9bfeaa2..4a02587 100644 --- a/lib/character.h +++ b/lib/character.h @@ -11,7 +11,7 @@ * @brief Append a character to a string, assuming string points to an array * with enough space. * - * @param string + * @param string_value * @param character * @since v1.0.0 */ @@ -20,7 +20,7 @@ void character_append(string_t string_value, char character); /** * @brief Append a character to a string at a specific index, assuming string points to an array with enough space. * - * @param string + * @param string_value * @param character * @param index * @since v1.0.0 @@ -46,8 +46,6 @@ char character_to_lower(const char character); /** * @brief Check if the character is a digit ('0', '1', '2', '3', '4', '5', '6', '7, '8' or '9'). * - * @param string1 - * @param string2 * @return true if the character is a digit, false otherwise * @since v1.0.0 */ diff --git a/lib/convert.h b/lib/convert.h index 4de8b64..aaac456 100644 --- a/lib/convert.h +++ b/lib/convert.h @@ -37,7 +37,7 @@ char convert_digit_to_character(const char digit); /** * @brief Convert a string to a number. * - * @param string + * @param string_value * @since v1.0.0 */ long long convert_string_to_number(const string_t string_value); diff --git a/lib/hash_map.h b/lib/hash_map.h index 178588b..8981601 100644 --- a/lib/hash_map.h +++ b/lib/hash_map.h @@ -34,9 +34,10 @@ struct hash_map_item { /** * @brief Hash function (using SipHash 1-3 algorithm). - * @link https://en.wikipedia.org/wiki/SipHash * @param key * @param capacity + * @see https://en.wikipedia.org/wiki/SipHash + * @see https://github.com/veorq/SipHash * @since v2.0.0 */ uint64_t hash(string_t key, size_t capacity); diff --git a/lib/string.h b/lib/string.h index c1b27f1..d56db82 100644 --- a/lib/string.h +++ b/lib/string.h @@ -13,7 +13,7 @@ /** * @brief Return the length of a string (excluding '\0'). * - * @param string + * @param string_value * @since v1.0.0 */ size_t string_get_length(const string_t string_value); @@ -21,7 +21,7 @@ size_t string_get_length(const string_t string_value); /** * @brief Converts all the alphabetic characters in a string to uppercase. * - * @param string + * @param string_value * @since v1.0.0 */ string_t string_to_uppercase(string_t string_value); @@ -29,7 +29,7 @@ string_t string_to_uppercase(string_t string_value); /** * @brief Converts all the alphabetic characters in a string to lowercase. * - * @param string + * @param string_value * @since v1.0.0 */ string_t string_to_lowercase(string_t string_value); @@ -37,9 +37,9 @@ string_t string_to_lowercase(string_t string_value); /** * @brief Replace all the occurrences of search value into replace value in the string. * - * @param string - * @param search_value A character search value. - * @param replace_value A character containing the text to replace for match. + * @param string_value + * @param search A character search value. + * @param replace A character containing the text to replace for match. * @since v1.0.0 */ string_t string_replace(string_t string_value, char search, char replace); @@ -47,7 +47,7 @@ string_t string_replace(string_t string_value, char search, char replace); /** * @brief Removes all whitespace from the start of a string. * - * @param string + * @param string_value * @since v1.0.0 */ string_t string_trim_start(string_t string_value); @@ -55,7 +55,7 @@ string_t string_trim_start(string_t string_value); /** * @brief Removes all whitespace from the end of a string. * - * @param string + * @param string_value * @since v1.0.0 */ string_t string_trim_end(string_t string_value); @@ -63,7 +63,7 @@ string_t string_trim_end(string_t string_value); /** * @brief Removes all whitespace from the start and end of a string. * - * @param string + * @param string_value * @since v1.0.0 */ string_t string_trim(string_t string_value); @@ -71,7 +71,7 @@ string_t string_trim(string_t string_value); /** * @brief Return the copy of a string. * - * @param string + * @param string_value * @since v1.0.0 */ string_t string_copy(const string_t string_value); @@ -79,7 +79,7 @@ string_t string_copy(const string_t string_value); /** * @brief Capitalizes the string. * - * @param string + * @param string_value * @since v1.0.0 */ string_t string_capitalize(string_t string_value); @@ -87,7 +87,7 @@ string_t string_capitalize(string_t string_value); /** * @brief Returns the total number of occurrences of the given character in the string. * - * @param string + * @param string_value * @param character * @since v1.0.0 */ @@ -96,7 +96,7 @@ size_t string_total_occurrences_of_character(string_t string_value, char charact /** * @brief Reverse the characters in an array. * - * @param string + * @param string_value * @since v1.0.0 */ string_t string_reverse(const string_t string_value); @@ -114,7 +114,7 @@ bool string_equals(const string_t string1, const string_t string2); /** * @brief Check if the string is a integer. * - * @param string + * @param string_value * @return true if the string is a integer, false otherwise. * @since v1.0.0 */ @@ -123,8 +123,9 @@ bool string_get_is_integer(const string_t string_value); /** * @brief Split a string into substrings using the specified separator and return them as an array and update the pointer `result_size` to the resulting size of the created array. * - * @param string + * @param string_value * @param separator + * @param result_size * @since v1.0.0 */ string_t* string_split(const string_t string_value, char separator, size_t* result_size); @@ -134,6 +135,7 @@ string_t* string_split(const string_t string_value, char separator, size_t* resu * * @param array * @param separator + * @param array_length * @since v1.0.0 */ string_t string_join(string_t* array, const char separator, size_t array_length); @@ -159,7 +161,7 @@ bool string_get_has_unique_characters(const string_t string); /** * @brief Returns the part of the string between the start and end indexes (both included). * - * @param string + * @param string_value * @param index_start * @param index_end * @since v1.0.0 @@ -169,7 +171,7 @@ string_t string_substring(const string_t string_value, size_t index_start, size_ /** * @brief Check if a string contains a substring. * - * @param string + * @param string_value * @param substring * @return true if the string contains the substring, false otherwise. * @since v1.0.0 @@ -179,16 +181,20 @@ bool string_get_is_substring(const string_t string_value, const string_t substri /** * @brief Format a number to a string with specified separator. * - * @param integer - * @example string_get_formatted_number(1000, " ") // "1 000" + * @param number + * @param separator * @since v1.0.0 + * @code + * string_get_formatted_number(1000, " ") // "1 000" + * string_get_formatted_number(1000, ",") // "1,000" + * @endcode */ string_t string_get_formatted_number(const long long number, string_t separator); /** * @brief Returns a pointer to the last occurrence of character in the string. * - * @param string + * @param string_value * @param character * @since v1.0.0 */ @@ -197,7 +203,7 @@ string_t string_get_last_occurence_of_character(const string_t string_value, cha /** * @brief Check if a string starts with a substring. * - * @param string + * @param string_value * @param prefix * @return true if the string starts with the substring, false otherwise. * @since v1.0.0 @@ -207,7 +213,7 @@ bool string_starts_with(const string_t string_value, const string_t prefix); /** * @brief Check if a string ends with a substring. * - * @param string + * @param string_value * @param prefix * @return true if the string ends with the substring, false otherwise. * @since v1.0.0