-
-
Notifications
You must be signed in to change notification settings - Fork 168
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
Lint all files in a workspace #47
Comments
The way VS Code works, I’m not sure you can report violations against documents that are not open. But I can look into this, thanks! |
I don't see a good way to implement this as a VS Code extension with the way things are today. There are two main issues:
If/when good solutions to the above show up, I'll revisit this issue. |
Would it be possible to lint all files for checking if they have any linting error and then only open those files in the VS Code editor that have linting errors? |
Yes, but per item 1 above, there is no easy way to know what the project exclusions are. Linting, for example, Re-implementing (and maintaining) the logic VS Code uses for this is not something I’d like to sign up for. |
Related/Similar ESLint ticket for linting all files rather than just open ones, which has some discussion and links that may be helpful microsoft/vscode-eslint#91. It is still unresolved as well. |
My workaround is to use the GitHub markdown-linting-action for it: name: Tests
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v2
- name: Lint all files
uses: avto-dev/markdown-lint@v1
with:
args: 'en/'
config: '.markdownlint.yml' The |
ESlint does this by providing a task, and a problem matcher to scan the task output. That way you can view problems in all files, errors persist until you re-run the task. |
Thanks, @aNickzz, this looks promising! |
This feature would save me some time! |
I have this mostly written! There will be no dependency on CLI or an installed runtime. |
This is excellent @DavidAnson, got around to using on a project today and it works like a charm, thank you! |
This is great, the only suggestion I'd add is to include |
@OldStarchy Who uses the vendor pattern? Can you point to some examples? It's easy to add, but I'd like to keep that list to the really common stuff. |
Sure, |
I added a TODO, thanks. |
…t list of lintWorkspaceGlobs exclusions (refs #47).
Currently, only the opened files are linted. It would be useful to have a command to lint all Markdown files in a workspace.
The text was updated successfully, but these errors were encountered: