Skip to content

Commit

Permalink
Allow code like ABC123 for flake8 v3 plugin (#6925)
Browse files Browse the repository at this point in the history
* change REGEX for flake8 v3

* create news file for fixing #4074
  • Loading branch information
dbftdiyoeywga authored and Kartik Raj committed Aug 23, 2019
1 parent a5d39a9 commit 7b4e7c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions news/2 Fixes/4074.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Supports error codes like ABC123 as used in plugins.
3 changes: 2 additions & 1 deletion src/client/linters/baseLinter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '(?<line>\\d+),(?<column>-?\\d+),(?<type>\\w+),(?<code>\\w\\d+):(?<message>.*)\\r?(\\n|$)';
// Allow codes with more than one letter (i.e. ABC123)
const REGEX = '(?<line>\\d+),(?<column>-?\\d+),(?<type>\\w+),(?<code>\\w+\\d+):(?<message>.*)\\r?(\\n|$)';

export interface IRegexGroup {
line: number;
Expand Down

0 comments on commit 7b4e7c0

Please sign in to comment.