-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter out files and folders to exclude #5
base: master
Are you sure you want to change the base?
Conversation
Hey there! I just built a new temporary npm package based on 6a5ad9d. You can download it here or install it by running the following command: npm install https://github.com/rokucommunity/bsc-plugin-auto-findnode/releases/download/v0.0.0-packages/bsc-plugin-auto-findnode-0.1.0-3-ability-to-exclude-certain-folders-or-libraries.20240821180237.tgz |
Hey there! I just built a new temporary npm package based on 105b625. You can download it here or install it by running the following command: npm install https://github.com/rokucommunity/bsc-plugin-auto-findnode/releases/download/v0.0.0-packages/bsc-plugin-auto-findnode-0.1.0-3-ability-to-exclude-certain-folders-or-libraries.20240821180512.tgz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to tweak the path filtering a bit more. It should walk through the filters one-by-one.
Something like:
let fileIsExcluded = false;
for(const filter of filters){
let isFIlterNegated = filter.startsWith('!');
if(filter.isMatch(filePath)){
fileIsExcluded = !isFilterNegated;
}
}
//we've made it through every path, `fileIsExcluded` now accurately represents what should happen to this file.
@@ -70,5 +70,8 @@ | |||
"ts-node": "^10.9.2", | |||
"typescript": "^4.7.2", | |||
"undent": "^0.1.0" | |||
}, | |||
"dependencies": { | |||
"minimatch": "^10.0.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use the same version that's in brighterscript, just for consistency's sake. I'm sure they work in a similar fashion.
@@ -16,112 +18,145 @@ function findChildrenWithIDs(children: Array<SGNode>): Map<string, Range> { | |||
return foundIDs; | |||
} | |||
|
|||
function getFilteredScopes(program: Program) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This exclusion logic is not correct. Each pattern operates based on the results of the previous pattern. For example:
[
//exclude all vendor scripts
"source/vendor/**/*",
//except don't exclude rodash
"!source/vendor/rodash/**/*",
//except DO exclude this specific rodash file
"source/vendor/rodash/_all.bs"
]
No description provided.