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

Respect --ignore-dirs flag in import analysis #7

Merged
merged 2 commits into from
May 10, 2022
Merged

Conversation

crdueck
Copy link

@crdueck crdueck commented May 10, 2022

Avoid analyzing the imports of files in directories that were explicitly ignored by --ignore-dirs flag.

crdueck added 2 commits May 9, 2022 16:13
The `modifiedPackages` var is created only to later select the
`ImportPath` field of each `Package`. Since the import paths are already
stored in the `pkgSeen` map, it's an unnecessary intermediate.
@crdueck crdueck requested a review from cuongptnk May 10, 2022 13:41
@cuongptnk
Copy link

The PR looks good. Just summarize to check whether I understand it correctly

  • The change line 76-78 is the main fix: we ignore the changed files at line 42-44, but we doesn't ignore the path when checking for import
  • Other changes are for efficiency: pkgSeen mapping already includes the array modifiedPackages

@crdueck crdueck merged commit 866e905 into master May 10, 2022
@crdueck crdueck deleted the ignore-dirs-imports branch May 10, 2022 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants