version: 5.0.8
OS: Ubuntu 22.04
The exclude scan option isn't respected in the following case
// chose a path of existing dir
const dir = '/mnt/Projects/Docker/';
const dirRegex = /^\/mnt\/Projects\/Docker\/$/i;
// test the regex -> true
const testResult = dirRegex.test(dir);
const ignoreDirs = [dirRegex];
// the exclude scan options isn't respected
const scanOpts = {
stat: true,
normalize: true,
followLinks: true,
size: true,
hash: true,
depth: 5,
exclude: ignoreDirs,
extensions: [ 'yml' ]
};