loadMintIgnore() handles directory patterns ending in /*, but it always removes the first character with slice(1, -2).
File evidence:
scripts/lib/docs-utils.js checks if (trimmed.endsWith('/*')).
- That branch stores
ignored.dirs.add(trimmed.slice(1, -2)), assuming the pattern starts with /.
- The file-pattern branch immediately below supports both leading-slash and bare filenames, so a contributor can reasonably expect
foo/* to work the same way as /foo/*.
For a slashless directory pattern such as draft-notes/*, the parser stores raft-notes, so the intended directory is not ignored and there is no warning.
Expected behavior: directory patterns should preserve the directory name whether they are written as /foo/* or foo/*.
loadMintIgnore()handles directory patterns ending in/*, but it always removes the first character withslice(1, -2).File evidence:
scripts/lib/docs-utils.jschecksif (trimmed.endsWith('/*')).ignored.dirs.add(trimmed.slice(1, -2)), assuming the pattern starts with/.foo/*to work the same way as/foo/*.For a slashless directory pattern such as
draft-notes/*, the parser storesraft-notes, so the intended directory is not ignored and there is no warning.Expected behavior: directory patterns should preserve the directory name whether they are written as
/foo/*orfoo/*.