fix tests
fix tests Revert "fix tests" This reverts commit 7be374d70bd220d73154cd254ea91cab45c8a249.
This commit is contained in:
parent
64f851c750
commit
74af332dcb
1 changed files with 3 additions and 4 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import path from "path";
|
||||
import { pathToFileURL } from "url";
|
||||
import Parser from "web-tree-sitter";
|
||||
import { FileType, IDE, Position } from "../../..";
|
||||
import { FileType, IDE, Position } from "../../../";
|
||||
import { localPathOrUriToPath } from "../../../util/pathToUri";
|
||||
import { getFullLanguageName, getQueryForFile } from "../../../util/treeSitter";
|
||||
import {
|
||||
|
|
@ -854,15 +854,14 @@ export class StaticContextService {
|
|||
try {
|
||||
const currentUri = pathToFileURL(currentPath).toString();
|
||||
const entries = await this.ide.listDir(currentUri);
|
||||
|
||||
for (const [name, fileType] of entries) {
|
||||
const fullPath = localPathOrUriToPath(path.join(currentPath, name));
|
||||
|
||||
if (fileType === FileType.Directory) {
|
||||
if (fileType === (2 as FileType.Directory)) {
|
||||
if (!shouldSkipDirectory(name)) {
|
||||
await scanRecursively(fullPath);
|
||||
}
|
||||
} else if (fileType === FileType.File) {
|
||||
} else if (fileType === (1 as FileType.File)) {
|
||||
const extension = path.extname(name).toLowerCase();
|
||||
if (tsExtensions.includes(extension)) {
|
||||
tsFiles.push(fullPath);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue