Skip to content
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.

Remove extension-side problem matchers to remove duplicate error/warnings #178

Closed
wants to merge 1 commit into from
Closed
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
33 changes: 0 additions & 33 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,39 +105,6 @@
}
]
},
"problemMatchers": [
{
"name": "rustc",
"owner": "rust",
"fileLocation": [
"relative",
"${workspaceRoot}"
],
"pattern": [
{
"regexp": "^(warning|warn|error)(\\[(.*)\\])?: (.*)$",
"severity": 1,
"message": 4,
"code": 3
},
{
"regexp": "^([\\s->=]*(.*):(\\d*):(\\d*)|.*)$",
"file": 2,
"line": 3,
"column": 4
},
{
"regexp": "^.*$"
},
{
"regexp": "^([\\s->=]*(.*):(\\d*):(\\d*)|.*)$",
"file": 2,
"line": 3,
"column": 4
}
]
}
],
"configuration": {
"type": "object",
"title": "Rust configuration",
Expand Down
13 changes: 4 additions & 9 deletions src/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ interface CargoTaskDefinition extends TaskDefinition {

interface TaskConfigItem {
definition: CargoTaskDefinition;
problemMatcher: Array<string>;
group?: TaskGroup;
presentationOptions?: TaskPresentationOptions;
}
Expand All @@ -84,7 +83,7 @@ function getCargoTasks(): Array<Task> {
return list;
}

function createTask(rootPath: string, { definition, group, presentationOptions, problemMatcher }: TaskConfigItem): Task {
function createTask(rootPath: string, { definition, group, presentationOptions }: TaskConfigItem): Task {
const TASK_SOURCE = 'Rust';

const execCmd = `${definition.command} ${definition.args.join(' ')}`;
Expand All @@ -93,7 +92,9 @@ function createTask(rootPath: string, { definition, group, presentationOptions,
};
const exec = new ShellExecution(execCmd, execOption);

const t = new Task(definition, definition.taskName, TASK_SOURCE, exec, problemMatcher);
//Specify no problem matchers so VSC doesn't prompt
//the user for a problem format
const t = new Task(definition, definition.taskName, TASK_SOURCE, exec, []);

if (group !== undefined) {
t.group = group;
Expand All @@ -107,8 +108,6 @@ function createTask(rootPath: string, { definition, group, presentationOptions,
}

function createTaskConfigItem(): Array<TaskConfigItem> {
const problemMatcher = ['$rustc'];

const presentationOptions: TaskPresentationOptions = {
reveal: TaskRevealKind.Always,
panel: TaskPanelKind.New,
Expand All @@ -124,7 +123,6 @@ function createTaskConfigItem(): Array<TaskConfigItem> {
'build'
],
},
problemMatcher,
group: TaskGroup.Build,
presentationOptions,
},
Expand All @@ -137,7 +135,6 @@ function createTaskConfigItem(): Array<TaskConfigItem> {
'run'
],
},
problemMatcher,
presentationOptions,
},
{
Expand All @@ -149,7 +146,6 @@ function createTaskConfigItem(): Array<TaskConfigItem> {
'test'
],
},
problemMatcher,
group: TaskGroup.Test,
presentationOptions,
},
Expand All @@ -162,7 +158,6 @@ function createTaskConfigItem(): Array<TaskConfigItem> {
'clean'
],
},
problemMatcher: [],
presentationOptions,
},
];
Expand Down