From 8abfcaafda6a242c33bf41231c5f04d3fa944c62 Mon Sep 17 00:00:00 2001 From: Jamal Carvalho Date: Tue, 3 May 2022 16:01:46 +0000 Subject: [PATCH] vscode-go: add strict typecheck step to CI Test files are excluded from strict typechecking. We plan to fix errors in those files as needed or remove the tests with the legacy tooling. For golang/vscode-go#57. Change-Id: I84ea8bc1834e2e1ee58c297fed984bb94ec0de52 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/403775 TryBot-Result: kokoro Run-TryBot: Jamal Carvalho Auto-Submit: Jamal Carvalho Reviewed-by: Hyang-Ah Hana Kim --- build/all.bash | 1 + package.json | 1 + tsconfig.strict.json | 8 ++++++++ 3 files changed, 10 insertions(+) create mode 100644 tsconfig.strict.json diff --git a/build/all.bash b/build/all.bash index a0d858a7..ac2eb8bc 100755 --- a/build/all.bash +++ b/build/all.bash @@ -45,6 +45,7 @@ run_test() { echo "**** Run test ****" df -h | grep shm npm ci + npm run typecheck npm run compile npm run unit-test npm test --silent diff --git a/package.json b/package.json index 3e558d5a..a74f0799 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "bundle-dev": "npm run bundle -- --sourcemap", "bundle-watch": "npm run bundle -- --sourcemap --watch", "test-compile": "tsc -p ./tsconfig.build.json", + "typecheck": "tsc -p ./tsconfig.strict.json --noEmit", "compile": "npm run bundle", "watch": "tsc -watch -p ./tsconfig.build.json", "test": "npm run test-compile && node ./out/test/runTest.js", diff --git a/tsconfig.strict.json b/tsconfig.strict.json new file mode 100644 index 00000000..21f3f44b --- /dev/null +++ b/tsconfig.strict.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "exclude": [ + "node_modules", + "third_party", + "test" + ] +} \ No newline at end of file