From 327486d89796356e4aa612905770a9d1f724dd3b Mon Sep 17 00:00:00 2001 From: Marc Date: Fri, 13 Jan 2023 20:04:00 +0100 Subject: [PATCH] Cleanup and improved conventions. --- CMakeLists.txt | 4 ++-- FutureWorkNeeded.md | 4 ++++ naming_conventions.md => code style.md | 5 +++-- 3 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 FutureWorkNeeded.md rename naming_conventions.md => code style.md (67%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 216a472..9cea038 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,8 +9,8 @@ if(CMAKE_BUILD_TYPE MATCHES DEBUG) endif() set(CMAKE_C_FLAGS "-Wall -Wextra -pedantic -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wmaybe-uninitialized") -set(CMAKE_C_FLAGS_DEBUG "-g -fsanitize=address -Werror -O0") -set(CMAKE_C_FLAGS_RELEASE "-g") +set(CMAKE_C_FLAGS_DEBUG "-g -Werror -O0") +set(CMAKE_C_FLAGS_RELEASE "") # generate the compile_commands for vscode / clang set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "") diff --git a/FutureWorkNeeded.md b/FutureWorkNeeded.md new file mode 100644 index 0000000..7a65012 --- /dev/null +++ b/FutureWorkNeeded.md @@ -0,0 +1,4 @@ +* Add tests +* Add safe interrupt support +* Add a gui in an external binary +* make the CLI into a separate binary diff --git a/naming_conventions.md b/code style.md similarity index 67% rename from naming_conventions.md rename to code style.md index 2b090e1..a27a6cc 100644 --- a/naming_conventions.md +++ b/code style.md @@ -2,17 +2,18 @@ ## Function names -### shared functions +### header functions function should start by the name of their module in camelCase followed by an underscore and the name of the function in camelCase example: steam_searchGames() +if the function has the same name as the module then it doesn't need to be repeated. ### static functions -there is no rule for now +all static functions should be in camelCase and they should not mention their module. ## Struct names