You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I like your project and tried to use it today.
After building the source, I run it in my project just to find out that there are a few problems in the source code that I want to address.
First, you require the user to have a .gitignore file in his project. If the user does not have it, the program will fail at
let gitignore = fs::read_to_string(".gitignore")?;
To solve this error, I personally changed it to this:
let gitignore = fs::read_to_string(".gitignore");let gitignore = if gitignore.is_ok(){
gitignore
.unwrap().lines().map(|line| line.trim()).filter(|line| !line.starts_with('#')).map(|line| line.to_string()).collect::<Vec<String>>()}else{vec![]};
That works fine for me because now, having a gitignore is optional.
Second, you require the user to add extensions to all files. Files with no extensions will let the program fail aswell here:
if !supported_filetypes.contains(&entry.path().extension().unwrap().to_str().unwrap()){// ^^ here will it failcontinue;}
Hey, I like your project and tried to use it today.
After building the source, I run it in my project just to find out that there are a few problems in the source code that I want to address.
First, you require the user to have a
.gitignore
file in his project. If the user does not have it, the program will fail atTo solve this error, I personally changed it to this:
That works fine for me because now, having a gitignore is optional.
Second, you require the user to add extensions to all files. Files with no extensions will let the program fail aswell here:
I solved that issue by using a
let Some
:That were two things I wanted to address.
Nontheless, it is a great project and I hope somebody will find this usefull
~ Marius, 2023
The text was updated successfully, but these errors were encountered: