From 7b4e7c0b31196985defc1411bba665f7efdfcb7d Mon Sep 17 00:00:00 2001 From: dbftdiyoeywga Date: Sat, 24 Aug 2019 04:29:49 +0900 Subject: [PATCH] Allow code like ABC123 for flake8 v3 plugin (#6925) * change REGEX for flake8 v3 * create news file for fixing #4074 --- news/2 Fixes/4074.md | 1 + src/client/linters/baseLinter.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 news/2 Fixes/4074.md diff --git a/news/2 Fixes/4074.md b/news/2 Fixes/4074.md new file mode 100644 index 000000000000..f392a2fc9bde --- /dev/null +++ b/news/2 Fixes/4074.md @@ -0,0 +1 @@ +Supports error codes like ABC123 as used in plugins. \ No newline at end of file diff --git a/src/client/linters/baseLinter.ts b/src/client/linters/baseLinter.ts index 859ced9296a4..84565817cedd 100644 --- a/src/client/linters/baseLinter.ts +++ b/src/client/linters/baseLinter.ts @@ -19,7 +19,8 @@ import { // tslint:disable-next-line:no-require-imports no-var-requires no-any const namedRegexp = require('named-js-regexp'); // Allow negative column numbers (https://github.com/PyCQA/pylint/issues/1822) -const REGEX = '(?\\d+),(?-?\\d+),(?\\w+),(?\\w\\d+):(?.*)\\r?(\\n|$)'; +// Allow codes with more than one letter (i.e. ABC123) +const REGEX = '(?\\d+),(?-?\\d+),(?\\w+),(?\\w+\\d+):(?.*)\\r?(\\n|$)'; export interface IRegexGroup { line: number;