Skip to content

Write list of unparsed fourslash tests to file #1447

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,4 @@ custom-gcl.hash
!NOTICE.txt

!internal/fourslash/_scripts/failingTests.txt
!internal/fourslash/_scripts/unparsedTests.txt
4 changes: 3 additions & 1 deletion internal/fourslash/_scripts/convertFourslash.mts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const stradaFourslashPath = path.resolve(import.meta.dirname, "../", "../", "../
let inputFileSet: Set<string> | undefined;

const failingTestsPath = path.join(import.meta.dirname, "failingTests.txt");
const unparsedTestsPath = path.join(import.meta.dirname, "unparsedTests.txt");
const helperFilePath = path.join(import.meta.dirname, "../", "tests", "util_test.go");

const outputDir = path.join(import.meta.dirname, "../", "tests", "gen");
Expand Down Expand Up @@ -37,7 +38,8 @@ export function main() {

generateHelperFile();
parseTypeScriptFiles(getFailingTests(), stradaFourslashPath);
console.log(unparsedFiles.join("\n"));
unparsedFiles.sort();
fs.writeFileSync(unparsedTestsPath, unparsedFiles.join("\n") + "\n", "utf-8");
const gofmt = which.sync("go");
cp.execFileSync(gofmt, ["tool", "mvdan.cc/gofumpt", "-lang=go1.24", "-w", outputDir]);
}
Expand Down
Loading
Loading