From 698849b7a3f8c52375710f23547961dca4bb2bd8 Mon Sep 17 00:00:00 2001 From: Ricardo Barros Date: Fri, 8 May 2015 12:15:44 +0100 Subject: [PATCH] fix issue #7 --- lib/linter-js-standard.coffee | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/lib/linter-js-standard.coffee b/lib/linter-js-standard.coffee index 2f88c5e..c62a73f 100644 --- a/lib/linter-js-standard.coffee +++ b/lib/linter-js-standard.coffee @@ -19,10 +19,9 @@ class LinterJsStandard extends Linter # A regex pattern used to extract information from the executable's output. regex: - '^((?!.*?eslint\/undefined.*?)' + - '((?.*?\\..*?(?=:))' + - '(:(?[0-9]+):(?[0-9]+):'+ - '(?.+)((?\\(jscs\/parseError\\))|(?\\(.*\\))))))$' + '^(?.*?\\..*?(?=:))' + + ':(?[0-9]+):(?[0-9]+):' + + '((?.*?(?=\\())((?.+undefined.*?)|(?.*?)))$' regexFlags: 'gm' @@ -69,15 +68,12 @@ class LinterJsStandard extends Linter formatMessage: (match) -> - type = if match.error - "E" - else if match.warning - "W" - else + if !match.error && !match.warning warn "Regex does not match lint output", match - "" - "#{match.message} (#{type})" + ## Dunno why I need to do this + ## but if I dont it doesnt show a message + "#{match.message}" destroy: -> atom.config.unobserve 'linter-js-standard.jsStandardExecutablePath'