Unreviewed changes
21 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: extension/src/language/goLanguageServer.ts
Insertions: 2, Deletions: 4.
@@ -74,6 +74,7 @@
InteractiveFormsFeature,
InteractiveMiddleware
} from './form';
+import { GoSemanticTokensFeature } from './goSemanticTokens';
export interface LanguageServerConfig {
serverName: string;
@@ -309,11 +310,9 @@
// LanguageClient.stop may hang if the language server
// crashes during shutdown before responding to the
// shutdown request. Enforce client-side timeout.
- try {
- void c.stop(2000);
- } catch (e) {
+ c.stop(2000).catch((e) => {
c.outputChannel?.appendLine(`Failed to stop client: ${e}`);
- }
+ });
}
export function toServerInfo(res?: InitializeResult): ServerInfo | undefined {
@@ -840,6 +839,7 @@
onDidChangeVulncheckResultEmitter
);
c.registerFeature(new InteractiveFormsFeature(c));
+ c.registerFeature(new GoSemanticTokensFeature());
onDidChangeVulncheckResultEmitter.event(async (e: VulncheckEvent) => {
if (!govulncheckTerminal) {
return;
```
```
The name of the file: extension/test/gopls/survey.test.ts
Insertions: 3, Deletions: 2.
@@ -337,7 +337,8 @@
[{ prompt: true, lastDatePrompted: yesterday }, '', 0]
];
- void testCases.map(async ([testConfig, choice, wantCount], i) => {
+ for (let i = 0; i < testCases.length; i++) {
+ const [testConfig, choice, wantCount] = testCases[i];
test(`opt out: ${i}`, async () => {
const stub = sandbox.stub(vscode.window, 'showInformationMessage').resolves({ title: choice });
const getGoplsOptOutConfigStub = sandbox.stub(goLanguageServer, 'getGoplsOptOutConfig').returns(testConfig);
@@ -356,5 +357,5 @@
`unexpected lastDatePrompted: ${JSON.stringify(got.lastDatePrompted)}`
);
});
- });
+ }
});
```
Change information
Commit message:
extension: enable @typescript-eslint/no-floating-promises rule
Enable the @typescript-eslint/no-floating-promises rule in
eslint.config.mjs and mark unawaited promises with `void`.
Using `void` satisfies the linter without changing existing
runtime behavior.
Change-Id: I5fca8ec53108b8afeffd93bff6add8ff8f24ff40
Files:
- M extension/eslint.config.js
- M extension/src/commands/applyCoverprofile.ts
- M extension/src/debugAdapter/goDebug.ts
- M extension/src/developerSurvey/prompt.ts
- M extension/src/diagnostics/goBuild.ts
- M extension/src/goCover.ts
- M extension/src/goDebugFactory.ts
- M extension/src/goEnvironmentStatus.ts
- M extension/src/goGenerateTests.ts
- M extension/src/goImpl.ts
- M extension/src/goImport.ts
- M extension/src/goInstallTools.ts
- M extension/src/goMain.ts
- M extension/src/goPackageOutline.ts
- M extension/src/goPackages.ts
- M extension/src/goPlayground.ts
- M extension/src/goSurvey.ts
- M extension/src/goTest.ts
- M extension/src/goTest/explore.ts
- M extension/src/language/goLanguageServer.ts
- M extension/src/language/legacy/goFormat.ts
- M extension/src/stateUtils.ts
- M extension/src/testUtils.ts
- M extension/src/util.ts
- M extension/test/gopls/goplsTestEnv.utils.ts
- M extension/test/gopls/survey.test.ts
- M extension/test/gopls/telemetry.test.ts
- M extension/test/integration/goDebug.test.ts
- M extension/test/integration/goDebugConfiguration.test.ts
- M extension/test/runTest.ts
Change size: M
Delta: 30 files changed, 90 insertions(+), 88 deletions(-)
Branch: refs/heads/master