Skip to content

adding exclude feature - #258

Open
MiguelAPerez wants to merge 1 commit into
wikimedia:masterfrom
MiguelAPerez:miguelaperez/feature-excludes
Open

MiguelAPerez wants to merge 1 commit into
wikimedia:masterfrom
MiguelAPerez:miguelaperez/feature-excludes

Conversation

@MiguelAPerez

@MiguelAPerez MiguelAPerez commented Jan 18, 2023 •

Copy link
Copy Markdown

Description

While using the available includes features some limitations were found when trying to exclude patterns (due to glob). For example when using ! on a character group, each letter is ignored instead of the group:

"include": [
        "sub-projects/![FooProject]*/composer.json",
],

This will exclude sub-project/F*, sub-project/o*, sub-project/o*, sub-project/P*, etc from being processed. This issue also causes significant toil when excluding multiple paths.

Note: Different variations of using ! has been considered but non has work so far

What’s The Change ?

To get around this and not change how includes works, excludes removed patterns and/or files from being processed.

"include": [
        "sub-projects/*/composer.json"
],
"exclude": [
        "sub-projects/Foo*/composer.json"
],

@MiguelAPerez
MiguelAPerez force-pushed the miguelaperez/feature-excludes branch from 08dc218 to 6591016 Compare January 18, 2023 23:47
@MiguelAPerez
MiguelAPerez marked this pull request as ready for review January 19, 2023 00:02
@rsd

rsd commented Jun 16, 2025

Copy link
Copy Markdown

This is exactly what I was looking for!

@binaryfire

Copy link
Copy Markdown

Any chance of getting this merged? This will make things much easier for complex setups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants