vscode-codeql
vscode-codeql copied to clipboard
Move findDirWithFile to files.ts
The findDirWithFile
function is pretty general and I'd argue belongs in files.ts
more than it does in database-fetcher.ts
. This refactoring is not a huge win in itself but it helps move towards a few goals:
- make
database-fetcher.ts
smaller and more focussed, and make a future refactoring I want to do easier - moves the tests of this function out of
vscode-tests/no-workspace
and intounit-test
- helps us remove the
test/vscode-tests/no-workspace/databases/database-fetcher.test.ts
file entirely so that the only remaining tests ofdatabase-fetcher.ts
aretest/vscode-tests/cli-integration/databases/database-fetcher.test.ts
Checklist
- [ ] CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
- [ ] Issues have been created for any UI or other user-facing changes made by this pull request.
- [ ] [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the
ready-for-doc-review
label there.