Skip to content

Commit 7b4e7c0

Browse files
dbftdiyoeywgaKartik Raj
authored andcommitted
Allow code like ABC123 for flake8 v3 plugin (#6925)
* change REGEX for flake8 v3 * create news file for fixing #4074
1 parent a5d39a9 commit 7b4e7c0

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

news/2 Fixes/4074.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Supports error codes like ABC123 as used in plugins.

src/client/linters/baseLinter.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ import {
1919
// tslint:disable-next-line:no-require-imports no-var-requires no-any
2020
const namedRegexp = require('named-js-regexp');
2121
// Allow negative column numbers (https://github.com/PyCQA/pylint/issues/1822)
22-
const REGEX = '(?<line>\\d+),(?<column>-?\\d+),(?<type>\\w+),(?<code>\\w\\d+):(?<message>.*)\\r?(\\n|$)';
22+
// Allow codes with more than one letter (i.e. ABC123)
23+
const REGEX = '(?<line>\\d+),(?<column>-?\\d+),(?<type>\\w+),(?<code>\\w+\\d+):(?<message>.*)\\r?(\\n|$)';
2324

2425
export interface IRegexGroup {
2526
line: number;

0 commit comments

Comments
 (0)