-
Notifications
You must be signed in to change notification settings - Fork 664
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
Avoid looking for config file outside current git repo #1436
Conversation
This fixes a bug where running the linter inside a project that did not had a config file could end-up picking a config file from another project (was happening only when projects were nested). From now on, we stop looking at parent directories when we encounter the .git folder, which can be seen as project boundary.
This is definitely an improvement, but isn't there a better way than looking for |
There is but I did not bother using the external command for this particular case because the other approach would have I do not expect this to be perfect but considering that discovery of config file was not even documented I doubt it will create any regressions. In fact I needed this change do the #1434 which uncovered this bug: mainly I am cloning some repos inside .cache and try to lint them. One of them does not have a linter config and it fails to run because without this change the linter loads the config from the upper level, which is not desired. I doubt anyone was so crazy to nest repos |
This fixes a bug where running the linter inside a project that did
not had a config file could endup picking a config file from another
project (was happening only when projects were nested).
From now on, we stop looking at parent directories when we encounter
the .git folder, which can be seen as project boundary.