vscode-codeql icon indicating copy to clipboard operation
vscode-codeql copied to clipboard

Move findDirWithFile to files.ts

Open robertbrignull opened this issue 11 months ago • 0 comments

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 into unit-test
  • helps us remove the test/vscode-tests/no-workspace/databases/database-fetcher.test.ts file entirely so that the only remaining tests of database-fetcher.ts are test/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.

robertbrignull avatar Mar 07 '24 16:03 robertbrignull