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

Skip over broken files when scanning the source #1883

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pneff
Copy link

@pneff pneff commented Nov 27, 2020

Q A
Bug fix? yes
New feature? no
Breaking change? no
Deprecations? no
Tests added? yes
Fixed issues #1623
License Apache-2.0

This fixes the bug #1623 and other similar issues.

When scanning source code, the previous behaviour was to trip up on any issue that statSync may raise. This can particularly happen for circular and broken symlinks.

The fix addresses this by creating a mock version of fs that does not even return such broken files from readdirSync.

The alternative fix would be to raise this on the klaw-sync package, but that might be a breaking change for the packages that depend on it.

This fixes the bug jsdoc#1623 and other similar issues.

When scanning source code, the previous behaviour was to trip up on any
issue that `statSync` may raise. This can particularly happen for
circular and broken symlinks.

The fix addresses this by creating a mock version of `fs` that does not
even return such broken files from `readdirSync`.

The alternative fix would be to raise this on the `klaw-sync` package,
but that might be a breaking change for the packages that depend on it.
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.

None yet

1 participant