Skip to content

Feature: Ignore Specific Invalid Files #10

@CatGuardian

Description

@CatGuardian

I have a feature request.

It would be really nice if there was an options that allowed me to specify a directory or a list of files to be ignored from erroring.

One of the files that is being looked at by depcheck requires sudo to access it. But it is completely irrelevant for gulp-depcheck or depcheck to be looking at it.

So I want to be able to have it not report the error when it gets flagged as an invalid file because the process doesn't have permission to read the file.

Here is a code snippet from gulpDepcheck.js:

        const invalidDirs = ignoreInvalidDirs ? [] : Object.keys(unused.invalidDirs || {}),
              invalidFiles = ignoreInvalidFiles ? [] : Object.keys(unused.invalidFiles || {});

        if (invalidFiles.length > 0) {
          return reject(pluginError(`Unable to parse some files: ${invalidFiles.join(', ')}`));
        }

I don't want it throw Unable to parse some files: ${invalidFiles.join(', ')} when this file that i'm talking about is invalid because I want it to be ignored.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions