Skip to content

Commit 9ef11da

Browse files
authored
Fix regex for matching pylint exceptions
For some linters pylama adds a semicolon to the error code, but for others not. The regex thus only matched a subset of the results pylama returned. This edit should fix that
1 parent 0f14176 commit 9ef11da

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/client/linters/pylama.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as baseLinter from './baseLinter';
44
import {OutputChannel} from 'vscode';
55
import { Product } from '../common/installer';
66

7-
const REGEX = '(?<file>.py):(?<line>\\d+):(?<column>\\d+): \\[(?<type>\\w+)\\] (?<code>\\w\\d+) (?<message>.*)\\r?(\\n|$)';
7+
const REGEX = '(?<file>.py):(?<line>\\d+):(?<column>\\d+): \\[(?<type>\\w+)\\] (?<code>\\w\\d+):? (?<message>.*)\\r?(\\n|$)';
88

99
export class Linter extends baseLinter.BaseLinter {
1010
constructor(outputChannel: OutputChannel, workspaceRootPath: string) {

0 commit comments

Comments
 (0)