Commit graph

118 commits

Author SHA1 Message Date
Raphael
e1625857f2
build(nix): adding nix flake
- Allow to all people on nix package manager to have the same env
2025-09-05 16:51:28 +02:00
Raphaël
63a1b2abdf
📚 Documentation & Build Update
📝 Documentation Overhaul:
- 	🚚 Function docs have been migrated from implementation files (.c) to their header files (.h) across the following modules:
- 	char
- 	convert
- 	list
- 	memory
- 	All documentation is now in Doxygen-style comments, making headers self-documented and turning the API into an easier-to-navigate codex.

##

🛠️ Build System Tweaks:
- 🔗 Added str/ft_strncpy.c to the SRC list in the Makefile, ensuring it’s properly compiled and linked into the arsenal.


##

 Impact

- Clearer and more maintainable API documentation.
- Stronger build consistency with all sources included.
- A polished codebase with up-to-date metadata.
2025-09-05 16:35:41 +02:00
Raphael
0bb6d77dbb
style(test/convert): normed the itoa tabs 2025-09-05 16:31:19 +02:00
Raphael
7e80beedb8
build(str/strncpy): adding strncpy to the makefile
- The file was here but not on the makefile so now it's patched
2025-09-05 16:30:55 +02:00
Raphael
2cf0714dc7
docs(str): moving the actual documentation on the header
- The documentation on the header allow u to see on the files where the
header is inclued
2025-09-05 16:30:00 +02:00
Raphael
701ce57f84
docs(print): moving the actual documentation on the header
- The documentation on the header allow u to see on the files where the
header is inclued
2025-09-05 16:29:51 +02:00
Raphael
ed64bd73d6
docs(memory): moving the actual documentation on the header
- The documentation on the header allow u to see on the files where the
header is inclued
2025-09-05 16:29:40 +02:00
Raphael
3cadabea0a
docs(list): moving the actual documentation on the header
- The documentation on the header allow u to see on the files where the
header is inclued
2025-09-05 16:29:29 +02:00
Raphael
52b85d2dc6
docs(convert): moving the actual documentation on the header
- The documentation on the header allow u to see on the files where the
header is inclued
2025-09-05 16:29:16 +02:00
Raphael
63c1dea7a2
docs(char): moving the actual documentation on the header
- The documentation on the header allow u to see on the files where the
header is inclued
2025-09-05 16:28:33 +02:00
Raphaël
78c37163f2
⚙️ Conversion & Character Utilities Update #3
🛡️ Robustness Buffs (Conversion Functions)
• 🧩 ft_atoi and ft_atoll gained a safety shield: they now return 0 when passed a null pointer, preventing accidental crashes.
• This change improves stability across the board, ensuring safer handling of unexpected input.

🧪 Test Suite Expansions

New & Expanded Conversion Trials
• 📝 Added extensive test coverage for ft_atoi, ft_atoll, and ft_itoa, including edge cases and null pointer handling.
• These tests live in test/convert/ and ensure your conversion toolkit is battle-ready for any scenario.

Character Function Test Output Polish
•  Updated all character test files (test_isalnum.c, test_isalpha.c, test_isascii.c, test_isprint.c, test_tolower.c, test_toupper.c) with better output formatting.
• Each result now ends with a newline → improved readability during long test runs.

🔨 Build & Test Process
• 🧹 The Makefile has been optimized:
• test target now depends on fclean + $(NAME) → always runs on a clean build.
• The test runner loop has been reformatted for cleaner output.

📦 Minor Updates
• 📅 File headers refreshed to reflect the latest modification dates, keeping the codebase neat and consistent.

 Impact
• Stronger crash resistance for conversion functions.
• More comprehensive and reliable test suite.
• Cleaner, more professional build & test pipeline.
• Better dev experience thanks to polished test outputs.
2025-09-05 15:17:06 +02:00
Raphael
18f174b2a2
test(convert): adding test to convert
- adding test for atoi / atoll / itoa
- Maybe a futur update to test atost (array to size_t)
2025-09-05 15:12:40 +02:00
Raphael
aa8544ba02
build(test): now test is building the libft before test 2025-09-05 15:10:54 +02:00
Raphael
f4cb339be7
fix(convert/atoll): atoll was now working with NULL parameters
- Now fixed by the verification before
2025-09-05 15:09:52 +02:00
Raphael
0988a2c8ab
fix(convert/atoi): atoi was now working with NULL parameters
- Now fixed by the verification before
2025-09-05 15:09:35 +02:00
Raphael
6255f5e0a3
style(test/char): adding the last '\n'
- For the last return line
2025-09-05 11:36:07 +02:00
Raphaël
94cdf7a155
Merge pull request #2 from EniumRaphael/test/char
fix(test/char): fixing typo on the error message
2025-09-05 10:57:32 +02:00
Raphael
1e717b0743
fix(test/char): fixing typo on the error message 2025-09-05 10:56:53 +02:00
Raphaël
3aa050dff6
🧪 Unit Test Update – Character Functions
🎯 Gameplay Fixes (a.k.a. Function Corrections)
	•	🔧 ft_isascii has been rebalanced: now consistently returns 1 for values within the ASCII range (0–127), instead of leaking the raw character value.
	•	🔧 ft_isprint has been patched: returns 1 only for printable characters (32–126), aligning with the standard library.

➡️ These fixes bring our character classification system fully in line with the C standard behavior. No more unfair RNG in return values!

⸻

🆕 New Content (a.k.a. Fresh Test Files)
	•	📜 test_isascii.c – Exhaustively tests ft_isascii vs isascii across values 0–128.
	•	📜 test_isprint.c – Pits ft_isprint against isprint across the same range.
	•	📜 test_tolower.c – Validates ft_tolower against tolower.
	•	📜 test_toupper.c – Validates ft_toupper against toupper.

⸻

 Impact
	•	Consistent, predictable behavior for all classification and transformation functions.
	•	A stronger, more reliable unit test suite to guard against future regressions.
	•	Confidence boost for upcoming boss fights (👀 the rest of libft).
2025-09-05 10:54:21 +02:00
Raphael
453b4d3b92
feat(test/char): adding the unitary test for ft_tolower
- toupper now have the test
2025-09-05 10:49:19 +02:00
Raphael
a7b156aaa6
feat(test/char): adding the unitary test for ft_tolower
- tolower now have the test
2025-09-05 10:49:07 +02:00
Raphael
764097af73
feat(test/char): adding the unitary test for ft_isprint
- isprint have now the unitary test
2025-09-05 10:48:48 +02:00
Raphael
0282b52326
feat(test/char): adding the test for ft_isascii
- isascii now is checked by the unitary test
2025-09-05 10:47:44 +02:00
Raphael
7051eaf1bf
fix(char): fixing the isascii / isprint
- Correcting the behavour of is ascii to the original given by the
original function
2025-09-05 10:47:02 +02:00
Raphael
4c6a17811f
fix(char/ischar): fix the work of the function
- Didn't now why the moulinette was working
2025-09-04 18:54:19 +02:00
Raphael
ad0f9d001e
feat(test/char): adding the first char tests 2025-09-04 18:53:33 +02:00
Raphael
75ac0ede8a
build(make): adding unitary test to the lib
- The files in test/ directory will be compiled and executed
2025-09-04 18:52:59 +02:00
Raphael
60e9279f3a
fix(make): correcting english error on my makefile 2025-09-04 18:52:16 +02:00
Raphael
49b0975c34
chore(ignore): adding test binary to ignore 2025-09-04 18:51:03 +02:00
Raphael
c4a1ccfeaa
style(action): renaming the main.yml to norminette.yml 2025-09-04 15:18:50 +02:00
Raphaël
ea7d73e5e6
Set terminal type for make command 2025-09-04 15:10:54 +02:00
Raphaël
ea37ab40b1
Remove unnecessary build steps from workflow 2025-09-04 15:09:40 +02:00
Raphaël
17a71d7178
chore(actions): workflow for norminette checks 2025-09-04 15:04:53 +02:00
Raphael
42a2efb059
refactor: make ft_checks function static
BREAKING CHANGE: function my_function is no longer exported
2025-09-04 12:01:38 +02:00
Raphael
df67357056
refactor: make check_args function static
BREAKING CHANGE: function my_function is no longer exported
2025-09-04 12:01:21 +02:00
Raphael
57a5156fcd
feat(include/color): init the color header for print propose
- all color was added in the libft for more pratical case
2025-09-04 11:54:38 +02:00
Raphael
e30fb6742a
refactor(includes): header now normed
- The library stddef was now normed
2025-09-04 11:54:05 +02:00
Raphael
b0f5199eff
refactor(print): changing the return_value to ret
- The variable name was to long for the norm
2025-09-04 11:50:11 +02:00
Raphael
a779c1040e
refactor(convert): normed the convert functions
- Norme was not passed after the modification but corrected now
2025-09-04 11:49:07 +02:00
Raphael
1c607fced3
refactor(char): normed the char functions
- Norme was not passed after the modification but corrected now
2025-09-04 11:48:50 +02:00
Raphael
02d16e2abe
chore(ignore/clang): adding the clangd to ignore git 2025-09-02 01:51:50 +02:00
Raphael
95b38f1810
ci(github/make): removing ci to improve it 2025-09-01 18:54:59 +02:00
Raphaël
d6a24269fd
ci(github/c): adding a workflow to test my lib 2025-09-01 18:52:20 +02:00
Raphael
1dcd4f5b09
feat(str/strncpy): adding the function strncpy
- strncpy allowed to copy a string into an other with a limitation fix
2025-09-01 18:48:57 +02:00
Raphael
905ffd4b72
refactor: only the usefull header
- Removing all 'libft.h' mention
- Using the include only on the files needed by
2025-09-01 18:45:33 +02:00
Raphael
afb804195a
build(make): improved the Makefile
- The C default Compiler is now defined if not defined
- Added the preprocessor rules with the includes rules
- Now the rules CC is use and not hardcoded
2025-09-01 18:43:15 +02:00
Raphael
2418466658
fix(lsp/neovim): now clangd rules in the Makefile
- The clangd file not needed to be on the repository so deleted it
- The clangd rules in the Makefile allows u to create the files with ur
current directory
2025-09-01 18:40:49 +02:00
Raphael
e53fcb1485
break(header): removing all the external header not needed
- prefering to build choose the includes on my files
2025-09-01 18:38:36 +02:00
Raphael
48491adb5e
style(header): removing the main header
- The header was calling all the sub-header and it was not clean so now
is remove
2025-09-01 18:37:26 +02:00
Raphael
bc5d5f5ffb
fix(headers): the header was twice time in the include folder 2025-09-01 18:36:14 +02:00