-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Option to work with .gitignore to perform parsing on files that don't match. #416
Comments
Hello, this is a feature request similar to #257 that was rejected. By the way, instead of adding an external library to norminette, why not use import subprocess
# all_files is already collected by norminette
all_files = {"ft_putchar.c", "ft_putstring.c", "main.c", "test.c"}
try:
command = f"git check-ignore {' '.join(all_files)}"
routput = subprocess.check_output(command, shell=True, universal_newlines=True)
except subprocess.CalledProcessError:
...
else:
ignored_files = set(routput.split())
# Now we can send to norminette the files that can be checked
checkable_files = all_files - ignored_files |
Hello @NiumXp ! Your suggestion for using subprocess is a better way definitely! I'll update my PR. Also, thanks for sharing the past PR! I hadn't looked through it and they are very helpful. My opinion is a bit different, in the first place there should not be unnecessary files such as I can't say anything since my admissions results are not yet available and I haven't seen the main student's assignment, but I don't believe this is an option that can be abused. It seems to me that the only reviews where this would be abused are reviews that have underlying problems in other areas. I hope you will reconsider, and if you still disagree to this option, you can close this Issue without worrying about me. I really appreciate your opinion! Thank you! |
I'm just a contributor, I can't close issues or merge PRs, only collaborators can do it. The feature is pretty cool, but the idea of implementing it can be a problem. It might turn out that this feature becomes global (at some point there would be some debate about this) instead of just being turned on by a flag, if that happens it would make cheating a bit easier (after committing all the files a cheater can create a I like the idea of |
Hi, I swam the Piscine in July and used this parser so much! I always wrote the following
.gitignore
to avoid submitting mymain.c
ora.out
.However norminette parses
main.c
and produces useless output. It would be so cool to have an option that would fulfill the title requirement! My Piscine is finished and I am free to work on this feature, can submit PR.To add parsing .gitignore, we will choose one of the following two approaches
I hope you like this feature proposal!
The text was updated successfully, but these errors were encountered: