Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Commit

Permalink
Merge pull request #10 from dmnd/show-message-ids
Browse files Browse the repository at this point in the history
Show message ids in lint messages

Fix #7
  • Loading branch information
dmnd committed Jul 29, 2014
2 parents 574005c + d99f407 commit 85dd778
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/linter-pylint.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ Linter = require "#{linterPath}/lib/linter"
class LinterPylint extends Linter
@enabled = false # false until executable checked
@syntax: 'source.python' # fits all *.py-files
cmd: "pylint --msg-template='{line},{column},{category},{msg}' --reports=n"
cmd: "pylint --msg-template='{line},{column},{category},{msg_id}: {msg}' --reports=n"

linterName: 'pylint'

regex: '^(?<line>\\d+),(?<col>\\d+),((?<error>error)|(?<warning>warning)),(?<message>.*)$'
regex: '^(?<line>\\d+),(?<col>\\d+),' +
'((?<error>error)|(?<warning>warning)),' +
'(?<msg_id>\\w\\d+):\\s(?<message>.*)$'
regexFlags: 'm'

constructor: (@editor) ->
Expand Down Expand Up @@ -45,4 +47,7 @@ class LinterPylint extends Linter
console.log 'stdout', stdout
@processMessage(stdout, callback)

formatMessage: (match) ->
"#{match.msg_id}: #{match.message}"

module.exports = LinterPylint

0 comments on commit 85dd778

Please sign in to comment.