Skip to content

fix(scripts): handle optional leading slash in mintignore directory patterns - #1820

Open
dumanoglu1 wants to merge 1 commit into
base:masterfrom
dumanoglu1:fix/mintignore-dir-pattern-leading-slash
Open

fix(scripts): handle optional leading slash in mintignore directory patterns#1820
dumanoglu1 wants to merge 1 commit into
base:masterfrom
dumanoglu1:fix/mintignore-dir-pattern-leading-slash

Conversation

@dumanoglu1

Copy link
Copy Markdown

What changed

Updated loadMintIgnore() so directory patterns ending in /* work both with and without a leading slash, and added a focused node:test regression test.

Why

The parser previously used trimmed.slice(1, -2) for every directory pattern, assuming entries were written like /foo/*. A slashless pattern like foo/* was stored as oo, so the intended directory was never ignored.

Fixes #1819

Validation

  • node --test scripts/lib/docs-utils.test.js
  • node --check scripts/llms.js
  • node --check scripts/agents.js
  • node --check scripts/lib/docs-utils.js
  • node --check scripts/lib/docs-utils.test.js
  • git diff --check -- scripts/lib/docs-utils.js scripts/lib/docs-utils.test.js

@cb-heimdall

Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/2
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

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.

loadMintIgnore mis-parses directory patterns without a leading slash

2 participants