fnando / vscode-linter

Extension for code linting, all in one package. New linters can be easily added through an extension framework.
https://marketplace.visualstudio.com/items?itemName=fnando.linter
MIT License
62 stars 16 forks source link

Docs request: clarify how to change the configuration file for a given linter #8

Closed olivierlefloch closed 2 years ago

olivierlefloch commented 2 years ago

I'm not seeing clearly laid out in the documentation how I should go about tweaking the global lint rules for a given linter (say to have yamllint ignore document-start globally or use a different default line-length)?

mariusehr1 commented 2 years ago

hello , I tried using the regular yamllint config location and it worked as this is suggested in their documentation:

https://yamllint.readthedocs.io/en/stable/configuration.html

I placed my configuration at ~/.config/yamllint/config and I noticed that since I have no other configuration anywhere else, it just uses this one.

Editing my config file also works without reloading the IDE

ryanmerolle commented 2 years ago

Can you override global configuration per git repo?

fnando commented 2 years ago

@olivierlefloch hey, sorry for not answer this earlier.

For pretty every single linter, all you have to do is following the linter's configuration. In this case (yamllint), you need to create a .yamllint.yml or .yamllint.yml file at the project's root directory.