From 1a19db5c843f6b3acc544f88e759e2ef38df0d54 Mon Sep 17 00:00:00 2001 From: Roman Date: Sat, 8 Dec 2018 18:32:12 +0300 Subject: [PATCH 1/2] [UPD] Pylint to use message names instead of codes --- src/client/linters/pylint.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/client/linters/pylint.ts b/src/client/linters/pylint.ts index ef015a260c46..250b8a182647 100644 --- a/src/client/linters/pylint.ts +++ b/src/client/linters/pylint.ts @@ -15,6 +15,8 @@ import { ILintMessage } from './types'; const pylintrc = 'pylintrc'; const dotPylintrc = '.pylintrc'; +const REGEX = '(?\\d+),(?-?\\d+),(?\\w+),(?[\\w-]+):(?.*)\\r?(\\n|$)'; + export class Pylint extends BaseLinter { private fileSystem: IFileSystem; private platformService: IPlatformService; @@ -67,12 +69,12 @@ export class Pylint extends BaseLinter { ]; } const args = [ - '--msg-template=\'{line},{column},{category},{msg_id}:{msg}\'', + '--msg-template=\'{line},{column},{category},{symbol}:{msg}\'', '--reports=n', '--output-format=text', uri.fsPath ]; - const messages = await this.run(minArgs.concat(args), document, cancellation); + const messages = await this.run(minArgs.concat(args), document, cancellation, REGEX); messages.forEach(msg => { msg.severity = this.parseMessagesSeverity(msg.type, this.pythonSettings.linting.pylintCategorySeverity); }); From b58c947ba1c4dacb9f206fdc2892f3b39a9cedfd Mon Sep 17 00:00:00 2001 From: Roman Date: Sat, 8 Dec 2018 19:01:32 +0300 Subject: [PATCH 2/2] [ADD] 2906.md --- news/1 Enhancements/2906.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 news/1 Enhancements/2906.md diff --git a/news/1 Enhancements/2906.md b/news/1 Enhancements/2906.md new file mode 100644 index 000000000000..209e19264d78 --- /dev/null +++ b/news/1 Enhancements/2906.md @@ -0,0 +1,2 @@ +Use Pylint message names instead of codes +(thanks to [Roman Kornev](https://github.com/RomanKornev/))