Skip to content
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

VSCode is scanning excluded files in node_modules/ #431

Open
3 tasks done
tylerlaprade opened this issue Jul 19, 2024 · 4 comments
Open
3 tasks done

VSCode is scanning excluded files in node_modules/ #431

tylerlaprade opened this issue Jul 19, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@tylerlaprade
Copy link

Checklist

Description

image

Code snippet that reproduces issue

ignore: # A list of paths or files which Sourcery will ignore.
  - .git
  - venv
  - .venv
  - env
  - .env
  - .tox
  - node_modules
  - .dev-run
  - build

Debug Information

IDE Version:
VSCode 1.91.1

Sourcery Version:
Sourcery v1.21.0

Operating system and Version:
macOS Sonoma 14.5

@tylerlaprade tylerlaprade added the bug Something isn't working label Jul 19, 2024
@Hellebore
Copy link
Collaborator

Hi @tylerlaprade - thanks for raising this.

I can't reproduce this at first attempt - could you let me know the structure of your workspace, i.e. which folder do you have open in vscode, are there multiple ones?

@tylerlaprade
Copy link
Author

I have one big monorepo with both my front-end and back-end code nested in directories. Just one folder. This "scanning" message remained for many minutes, so eventually I did Developer: Reload Window to get rid of it.

@ruancomelli
Copy link
Contributor

Hey, @tylerlaprade!

Currently, Sourcery interprets the paths listed in the ignore field relative to the project root path. Therefore,

ignore:
  - node_modules

will instruct Sourcery to ignore ./node_modules, but not e.g. ./frontend/node_modules (supposing here that frontend/ is the name of the directory where your front-end code is stored).

To fix this, you need to provide the path to the node-modules directory in your project including intermediate directory names:

ignore:
  - frontend/node_modules

Could you please try this solution and let me know if it works for you? 🙂

@ruancomelli ruancomelli self-assigned this Jul 24, 2024
@tylerlaprade
Copy link
Author

Thanks! I'm not sure how to trigger that "scanning" thing since it just showed up in my status bar one day, but I still see squiggles from Sourcery if I open up a file from paqarina/node_modules/.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants