-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
.gitignore
is not respected?
#199
Comments
The PySpelling is generally versioning system agnostic. I'm not sure that I have any immediate plans to change that. It does start to open a door for requests to support other version systems as well: SVN, Mercurial, Bazaar, etc. Generally, narrowing your file patterns is normally sufficient, but I don't really know anything about your environment, so it is hard to really advise beyond that. |
I got your point! With … and you are totally right, this only works for git, the same as pre-commit itself 🤔 |
Yeah, but the precommit hook was low maintenance to add. |
I can also suggest a PR if that helps 😅 |
I'm inclined to probably wait to see if this was a frequent requested thing first. I don't think the project is hindered by the lack of this functionality, and if we were to start down this road, I'd want to get it right. That's a lot of testing. I definitely have experience in this area as I have a file glob lib that I maintain and that is already used in this library, but that doesn't mean I'm anxious to implement and maintain a gitignore implementation that will definitely add to the maintenance cost. I'm sure the spec probably has some specific quirks that would need to be matched. |
Sure, no time-pressure here :-D Actually I'd just open I thought about this some more and it might be easier to just support handing over a list of |
So, I'll be honest, I'm still skeptical about the overall usefulness of this request.
Generally, I'm rarely running into an issue where I"m like, "oh, I wish PySpelling just ignored what was in my .gitignore". Granted, it would help if I had people highlight some pains they are experiencing that require this as I've yet to see real-world cases. Right now, this feels like a hypothetical. Before we talk PR, I guess I'd like to hear about real-world pains to first justify such a change. I think some testing and evaluation can be done on the side to alleviate said pains and see how practical it turned out to be. It may make a convincing argument. Assuming it was decided, yes there is a real sizable problem to be solved, a tested solution has been evaluated and tested yielding good results, then I think we could talk PR. If I had to guess, and we wanted .gitignore logic, an option for a job to include gitignore logic per job, or even a global option for those certain they want it everywhere may be more useable than forcing everything through source on command line. Whether |
I agree! Just one remark on the |
@schuellerf I actually think the "only changed" file thing is actually not a bad idea, though it would require me to start bringing version control support to some degree. I have an experiment here that did just that: #193, but I haven't pulled the trigger on anything like that yet. Some people use PySpelling in an action (https://github.com/rojopolis/spellcheck-github-actions). They've taken to providing a wrapper to provide "only changed" files for now. I definitely recognize that there may be a desire for something like this. I've generally been waiting to see how things develop and see how people use the tool. Originally, this was just written for myself, but made public. It surprised me how much use outside of myself it has received 🙂. I'm happy to add new things, but I often like to see how real desire there is for certain things before increasing maintenance cost. |
Maybe really just supporting a list of files on the command line will suffice for pre-commit |
(this way pre-commit does the heavy lifting to check if a file was changed or not) |
You can overload command line limits this way. If they were dumped to a file you could read in, or something like that, it would be more practical. |
I fully agree - even stdin would be better. |
It seems like pyspelling does not respect
.gitignore
.Are there plans to implement something like
--respect_gitignore
or make this the default not to spellcheck files & directories listed in.gitignore
?The text was updated successfully, but these errors were encountered: