Skip to content

Commit 5d0fef1

Browse files
committed
Merge branch 'topic/vscode-spark-problems' into 'master'
Avoid running the Prove codelens with no problem matchers See merge request eng/ide/ada_language_server!1693
2 parents c2f879b + 352fa00 commit 5d0fef1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

integration/vscode/ada/src/commands.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { AdaConfig, getOrAskForProgram, initializeConfig } from './debugConfigPr
1010
import { adaExtState, logger, mainOutputChannel } from './extension';
1111
import { findAdaMain, getProjectFileRelPath, getSymbols } from './helpers';
1212
import {
13+
DEFAULT_PROBLEM_MATCHER,
1314
SimpleTaskDef,
1415
TASK_PROVE_FILE_PLAIN_NAME,
1516
TASK_PROVE_LINE_PLAIN_NAME,
@@ -833,7 +834,14 @@ async function sparkProveSubprogram(
833834
task.name,
834835
task.source,
835836
undefined,
836-
task.problemMatchers,
837+
/**
838+
* In some cases the task returned by the API has an empty list of
839+
* problem matchers despite being configured with problem matchers in
840+
* tasks.json. In that case use the default problem matcher to avoid an
841+
* empty problem matcher list which would hide problems from the
842+
* Problems view.
843+
*/
844+
task.problemMatchers.length > 0 ? task.problemMatchers : [DEFAULT_PROBLEM_MATCHER],
837845
);
838846

839847
/**

0 commit comments

Comments
 (0)