{"id":13460043,"url":"https://github.com/Nuno-Jesus/libft_file_checker","last_synced_at":"2025-03-24T18:32:54.451Z","repository":{"id":63447016,"uuid":"560866632","full_name":"Nuno-Jesus/libft_file_checker","owner":"Nuno-Jesus","description":"Small tool to verify files of the libft project","archived":false,"fork":false,"pushed_at":"2022-11-24T23:56:38.000Z","size":45,"stargazers_count":6,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-01T10:20:02.509Z","etag":null,"topics":["42","42-libft","42born2code","42cursus","42porto","42school","c","programming","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nuno-Jesus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-02T12:52:49.000Z","updated_at":"2024-04-26T15:03:36.000Z","dependencies_parsed_at":"2023-01-22T19:15:07.350Z","dependency_job_id":null,"html_url":"https://github.com/Nuno-Jesus/libft_file_checker","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nuno-Jesus%2Flibft_file_checker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nuno-Jesus%2Flibft_file_checker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nuno-Jesus%2Flibft_file_checker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nuno-Jesus%2Flibft_file_checker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nuno-Jesus","download_url":"https://codeload.github.com/Nuno-Jesus/libft_file_checker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222004113,"owners_count":16914872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["42","42-libft","42born2code","42cursus","42porto","42school","c","programming","python"],"created_at":"2024-07-31T10:00:34.531Z","updated_at":"2024-10-29T06:30:18.533Z","avatar_url":"https://github.com/Nuno-Jesus.png","language":"Python","funding_links":[],"categories":["WELCOME"],"sub_categories":["**Libft**"],"readme":"# 42-tool\r\n\r\n## Description\r\n\r\nThis tool was developed to help **42** students to speed up boring checkings like missing files or wrong function prototypes in the first project of the Common Core, **libft**. At the time of the first launch (November 11th, 2022), the tool was built using the most up-to-date version of the subject found so far on intra.\r\n\r\n## This is great, you mind if I use your code?\r\n\r\n**You are free to fork the repository and study/modify/test the code on your own**. However, I would really appreciate it if you could text me on Slack (**ncarvalh**) whenever you find a bug or you have a suggestion, so I can properly introduce hotfixes or deploy some quality-of-life patches that can benefit the 42 community in general.\r\n\r\n## Is there any software required?\r\n\u003e If you're planning on running the tool in the 42 clusters, you can skip this section. \r\n\r\nIn order to correctly execute the tool, you must:\r\n- have [Python](https://www.python.org/downloads/) installed;\r\n- have either [Ubuntu](https://ubuntu.com/download) or [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) on your computer;\r\n- install [pip](https://linuxize.com/post/how-to-install-pip-on-ubuntu-20.04/) **ONLY IF** there is a missing package that you might need to install manually (text me, otherwise I won't know);\r\n\r\n## Great, I managed to do it! What's next?\r\n**1.** Fork/download the code from the repository to any path of your choice in your computer (the best would be to sit right next to your libft folder, like described below)\r\n\r\n**2.** If your directory tree looks like this...\r\n\r\n```txt\r\n\t│\r\n\t├── 42-tool (this directory)\r\n\t├── libft \t(your repository)\r\n\t│\r\n\t...\r\n```\r\nthen you can skip this step. Otherwise, you must change the \"path\" variable inside the **utils.py** file. It should look something like this:\r\n\r\n```py\r\n\timport os\r\n\timport copy\r\n\timport random\r\n\timport subprocess\r\n\r\n\tfrom colorama import Style\r\n\tfrom colorama import Fore\r\n\r\n\t# INSERT YOUR PATH HERE, INSIDE QUOTES\r\n\tpath = '../libft/'\r\n\r\n\t...\r\n```\r\n\r\n**3.** If you reached this step, you can finally execute it! Because the 'brain' of the tool was built on Python, there is no need for compilation and binary files generation (unlike C). Just open a terminal inside this directory's folder and run the **make** command:\r\n\r\n```shell \r\nmake\r\n```\r\n\r\nThe Makefile was configured to pull updates from the repository, so its ok to take a while to display the menu. It should prompt you with something similar to this:\r\n\r\n| Main Menu |\r\n|:--:|\r\n|![image](https://user-images.githubusercontent.com/93390807/201247275-97ef366e-467e-4204-afbf-386d620d8db5.png)|\r\n\r\nYou should press the char that corresponds to the option you want to run and press ENTER when you're done.\r\n\r\n## Can you give me a quick tour about the features and how they work?\r\nSure!\r\n\r\n**1. Check for forbidden files**\r\n\r\nIt prints out any extraneous files/folders your repository contains. Here's an example:\r\n\r\n| Good Example | Bad Example |\r\n|:--:|:--:|\r\n|![image](https://user-images.githubusercontent.com/93390807/201247416-c38b9607-55b8-4dca-bf59-0ec552a249c9.png)|![image](https://user-images.githubusercontent.com/93390807/201247355-c51032fc-4c2b-42e8-9f6c-ccfb7614f8e6.png)|\r\n\r\n**2./3. Check filenames for Mandatory/Bonus files**\r\n\r\nIt prints out the result of checking if every Mandatory/Bonus part file was delivered. Unless you chose the last option, you can chose to run this parts separately, since the Bonus part is optional. Here's an example of possible outputs: \r\n\r\n| Good Example | Bad Example |\r\n|:--:|:--:|\r\n|![image](https://user-images.githubusercontent.com/93390807/201247602-7e256eee-4b4c-4ab6-a0ad-64861ca0818e.png)|![image](https://user-images.githubusercontent.com/93390807/201247674-3de5f2b1-2923-45e2-9f1a-1de58d7b56a1.png)\r\n|\r\n\r\n**4. Run the Norminette**\r\n\r\nYou all know her. You all know how she looks like. I don't think I need an image for this one (for now...).\r\n\r\n**5./6. Look for incorrect function prototypes in '.c'/'libft.h' files**\r\n\r\nLike 2 and 3, this two can be done separately, not because they are not mandatory (because both are), but mostly due to modularity. You don't need to go through all the correct parts if you want a specific one. Both files might generate a **results.log** file if there are mismatching prototypes. Here are the possible results for a prototype:\r\n\r\n- In '.c' files:\r\n\t- [\u003cspan style='color:#00FF88'\u003e**CORRECT**\u003c/span\u003e] - Your prototype matches the parser's\r\n\t- [\u003cspan style='color:#FF7777'\u003e**MISSING**\u003c/span\u003e] - The parser found the file, but not the prototype (this one is still in the works to improve)\r\n\t- [\u003cspan style='color:#00AAFF'\u003e**MISMATCHING**\u003c/span\u003e] - The function name was found but the whole prototype doesn't match the expected one\r\n\t- [\u003cspan style='color:#FF7777'\u003e**FILE NOT DELIVERED**\u003c/span\u003e] - That one is pretty straight forward\r\n- In 'libft.h':\r\n\t- [\u003cspan style='color:#00FF88'\u003e**CORRECT**\u003c/span\u003e] - The same\r\n\t- [\u003cspan style='color:#FFDD00'\u003e**UNKNOWN**\u003c/span\u003e] - It found a strange prototype\r\n\t- [\u003cspan style='color:#00AAFF'\u003e**MISMATCHING**\u003c/span\u003e] - The same\r\n\t- [\u003cspan style='color:#FF7777'\u003e**MISSING**\u003c/span\u003e] - The same\r\n\t- [\u003cspan style='color:#FF7777'\u003e**FILE NOT DELIVERED**\u003c/span\u003e] - The same\r\n\u003e \u003cspan style = 'color: orange'\u003e NOTE: the variables in your prototypes should be named after the ones in the manual. Even a single different letter will trigger the MISMATCHING flag in the parsing of a prototype. \u003c/span\u003e\r\n\r\n| Parsing '.c' files | Parsing 'libft.h' file |\r\n|:--:|:--:|\r\n|![image](https://user-images.githubusercontent.com/93390807/201247801-833149e2-b4b8-424e-8e75-982f57c38b92.png)|![image](https://user-images.githubusercontent.com/93390807/201247860-21ca18ed-0533-4f68-89e1-ed7010353d5c.png)|\r\n\r\n**7. Full run**\r\n\r\nRuns all of the above.\r\n\r\n## Will there be more features?\r\n\r\nDefinitely! I intend to integrate more functionalities as I implement them, like analysing what and how the Makefile is compiling, do unit tests, upgrade the current features, normalize the UI and, of course, integrate good suggestions. Everytime I release a new patch or hotfix, I'll be deploying a new **[release](https://github.com/Nuno-Jesus/42-tool/releases)**, so make sure you check it!\r\n\r\n## Author\r\n\r\nNuno Jesus, 42 Porto, ncarvalh\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNuno-Jesus%2Flibft_file_checker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNuno-Jesus%2Flibft_file_checker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNuno-Jesus%2Flibft_file_checker/lists"}