chore: add gitattributes, rename guide, and template comments

Add .gitattributes enforcing LF line endings.

Add a rename guide to README.md for scaffolding new projects.

Comment main.c as a template placeholder to replace.
This commit is contained in:
2026-06-15 04:33:55 +02:00
parent 2d25ad3a10
commit 3ce42cc8db
3 changed files with 19 additions and 1 deletions
+1
View File
@@ -0,0 +1 @@
* text=auto eol=lf
+15 -1
View File
@@ -88,7 +88,21 @@ Linux / macOS:
./build/main
```
## Adding a new module (TDD workflow)
## Renaming the Project
To use this template for a new project, rename `ctdd` to your project
name:
1. Rename the `ctdd/` directory to `<src>/`.
2. Replace `ctdd` with `<src>` in:
- `CMakeLists.txt` (project name, `target_link_libraries`)
- `ctdd/CMakeLists.txt` (library names)
- All source `#include` directives
- `tests/CMakeLists.txt` (library references)
3. Update the `project()` call in `CMakeLists.txt`.
4. Update `main.c` to include your new headers.
Example: `ctdd/` becomes `mylib/`, `ctdd_str` becomes `mylib_str`.
### 1. Write the header
+3
View File
@@ -1,3 +1,6 @@
// Template placeholder — replace with your own entry point.
// Remove or rename this file when scaffolding a new project.
#include "ctdd/str.h"
#include "ctdd/report.h"
#include "ctdd/logger.h"