Skip to content
This repository was archived by the owner on Jun 16, 2025. It is now read-only.
This repository was archived by the owner on Jun 16, 2025. It is now read-only.

Allow to define patterns against absolute file path #107

@tamasmagedli

Description

@tamasmagedli

First of all it's a great tool and I wanted to integrate it into my project, though the use case of mine is a little bit different how you prefer to use it. Acutally I wanted to parse only a specific file list within the root directory so ignoring dirs doesn't help.

Reading the codebase I realised that I have another option, namely I can define parsers for patterns which is a cool a feature though it cannot be used for my use case, at least not for now.

Let's assume that we have two JS files within the src folder, and I want to use this pattern:
src/*.js

Currently it does not work as you get the basename from the absolute path of the file.
line 124 in check.js:
const basename = path.basename(filename);
This prevents to use a prefix pattern for the absolute path like mentioned before.

Can you please omit the basename call and pass the filename to the minimatch?

Thank you for fixing this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions