-
Notifications
You must be signed in to change notification settings - Fork 280
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
ignore-from-file should use path of .yamllint.yaml as base, not current working dir #673
Comments
Hello and thanks for the report. Yamllint doesn't handle Git repos differently than regular directories: if I suggest configuring flycheck to work like most Unix tools (if possible of course). Or maybe use an absolute path in |
It's not really git related. Imho it does not make sense use the |
Hello Jelle, and sorry about the delay. So the idea is that any file referenced by yamllint config would be relative to its own path. @ndrwnaguib what do you think? (you contributed |
When there is no config file, the original behavior remains. Since there is no file to calculate a relative path to, the path gets used as is, making it relative to the current working directory. |
If there is a
.yamllint.yaml
at the base of the git repo, withignore-from-file
pointing to .gitignore, yamllint stops working in subdirectories. It will pickup the .yamllint.yaml file in a higher level directory, but then tries to find .gitignore in the current folder. This causes it to fail withFileNotFoundError: [Errno 2] No such file or directory: '.gitignore'
.Making this extra annoying is that editor plugins like flycheck, that use yamllint, tend to use the directory where the file is located as the working dir. So having
ignore-from-file
in your project level.yamllint.yaml
breaks in-editor linting.The text was updated successfully, but these errors were encountered: