diff --git a/cmd/micro/runtime.go b/cmd/micro/runtime.go index d99032b4..2ae39567 100644 --- a/cmd/micro/runtime.go +++ b/cmd/micro/runtime.go @@ -561,7 +561,7 @@ func runtimePluginsGoGoLua() (*asset, error) { return a, nil } -var _runtimePluginsLinterLinterLua = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x8c\x55\x51\x8b\xe3\x36\x10\x7e\xcf\xaf\x18\x44\x0d\xd2\xae\xed\x2d\xf7\x18\xc8\xc3\x75\x69\x0f\xca\x5d\xaf\xb0\xd7\xde\x43\xdb\x2b\x8a\x35\x4a\xd4\x95\x25\x23\xc9\xc9\x86\xd2\xff\x5e\x24\x39\x89\xed\x75\x8e\x5b\x58\xac\x68\x66\xbe\x6f\xf4\xcd\x68\xa4\x24\xbc\xc3\xf0\xb1\x0b\xca\x1a\x4a\xb4\x32\x01\x1d\x61\xb0\xd9\x80\x51\x1a\xc2\x1e\xcd\x0a\x00\xe0\xad\x10\x33\x9f\x12\x82\xeb\x91\xad\xd0\x88\xd5\xea\x03\x7f\xc6\x47\xdb\xb6\xdc\x88\xec\x40\x4a\x18\x1c\xeb\xf8\x19\x6c\xa4\x84\xef\xd9\x6a\x25\x7b\xd3\x44\x2c\x18\x99\x28\x4b\x3c\x8f\xbd\xfb\x5d\xe1\x91\xb2\xf5\x13\x3f\x20\x95\x5c\x7b\xcc\x16\xd7\x9b\xf7\x09\x90\x0e\x9c\x17\x94\xb1\x25\x7a\x6a\xdb\x70\x0d\x32\xc0\xe6\x0a\x57\xff\xd0\xcb\xf5\x4f\x4a\xe3\xa7\x53\x87\x53\x3f\xa5\x71\xee\x59\xff\xca\xc3\x7e\xe4\x23\xf0\x60\x7a\xad\x61\x03\xe4\x41\xe0\xe1\x21\xfe\x20\xc9\xae\x24\x7c\x7c\x8a\x6a\x91\xa3\x32\xc2\x1e\x3d\xb9\x6a\x16\xff\x46\x91\xbf\xfc\xf6\x3e\xc7\xc4\xec\x87\xd8\x98\xe4\x06\xc8\xce\xce\xc2\xa2\x30\x94\xec\xec\xb6\x57\x3a\xaa\x46\x76\x16\xd2\x1a\x2a\x0b\x04\xea\xfa\x0c\x5c\x02\x29\xe4\xba\xd0\x6b\x28\x5a\xc2\x5e\xc5\x9f\x4b\x91\x57\x39\xf2\xf5\x49\x2f\x20\x85\xb8\x1f\x01\xa1\xf6\x78\xcd\x51\xf7\x7c\x31\x49\xdd\xf3\x66\x8f\xcd\x73\xaa\xf8\xb0\x86\xaa\x32\xb6\x6a\xac\xb6\x2e\x73\x46\x91\xbf\x89\xa5\x3b\x85\xbd\x35\x8b\x44\xdd\x49\x6a\xfe\x8c\x3e\x12\x9d\xd7\x0b\xe8\xb7\x90\x9b\x65\x89\x9b\x26\xe9\xd3\x34\x50\x49\x7f\x32\x81\xbf\x54\xd6\xe8\x13\x54\x9f\xb9\xd6\x50\x7d\xc6\x97\xe0\xf8\x8d\x43\xd4\xb7\xcf\x21\x16\xd9\x44\x9b\x8a\x29\x5a\x01\x59\x9d\x8d\x95\x12\x2a\x5b\x41\x75\x84\xea\xa8\xa0\x6a\x66\x54\x05\x2d\x74\xc1\xbe\xc6\xf4\x0f\x3f\x2c\x17\x26\x1a\xd2\xe1\xd2\x62\x49\x29\x74\xce\xba\xaf\x02\xfb\xc6\xa9\x2e\x2c\xc3\xfb\xfd\xd0\x5c\x79\x35\x27\x88\x6e\x08\x85\x2e\xeb\xfb\x72\x44\x61\xc4\xec\xf6\x5a\x93\x6e\xfa\x41\xe1\x91\x9d\xaf\xc5\xd2\x44\x9a\xa4\x30\xbf\xf2\x31\xf3\x8b\xf1\x3a\x43\x1e\x35\x72\xf7\x56\xeb\x77\x7d\x08\xe8\x3e\xa0\xf7\x7c\x87\x9e\xde\x4a\x25\x1d\x2c\x13\x96\xd0\xb4\xa2\xcc\x0a\x49\xeb\x5a\x1e\xe6\xf3\x29\x61\xcf\x80\x73\x2c\x5b\x25\xd7\x9f\xed\xf6\x29\x70\x17\x68\x42\x22\x64\xf8\x1f\xa6\xa2\x35\x3f\xbe\xa8\x28\xdf\x99\x6f\x42\x35\x97\x28\xfa\x52\xdb\x87\xae\x0f\x37\x22\xae\xc3\x2a\xea\xee\x61\x03\xbe\xd3\xa3\x20\xf2\xa7\x21\x43\x62\xd9\xcd\xe1\x0e\x5f\x60\x33\x46\x59\xef\x7c\xbf\xa5\xa4\x28\x64\x4c\x94\xd6\xf7\x8c\xb0\xcb\x9e\x4e\x7b\x85\x98\x6c\xb6\x57\xc7\x04\x2d\xad\x83\xbf\xcb\x54\x79\x65\x40\x75\x5c\xb9\xa4\x0a\x7a\x06\xc2\x5e\x2a\x54\x55\xf0\xc9\xa9\x16\x8e\x7b\x15\xd0\x77\xbc\xc1\x71\x73\xc5\x71\x1c\x3f\xeb\x96\x87\x66\x4f\xc9\x97\xc2\xdf\x45\x8e\xc2\xdf\x7d\x37\x9a\x71\x4a\x82\x0f\x4e\x99\x5d\x2d\x95\x11\x89\xa5\xcc\xa7\x9a\x35\xcb\x74\xd6\x27\xfd\xb0\x84\xd6\xef\xa2\x48\x19\x21\x33\x8d\x21\x26\xd1\x4a\xc2\x96\x7b\x34\xbc\x45\xfa\x7a\x7c\xa6\xd7\xf2\x62\x8f\x1c\x0b\x09\x4c\x9b\x67\xd2\x37\x97\x96\x0b\xd6\xf4\xed\x16\x5d\x4a\x84\xa5\x14\x4b\x78\x33\x4d\xe5\xfc\x78\x8c\xd7\xaf\x3b\x39\xd7\xde\x07\x57\x82\xc7\x8e\x4d\xca\xee\x7b\x1d\x9f\xc6\x7f\xff\x5b\x68\x06\x4a\xe8\x1f\x5f\x0a\xff\x57\x2a\x72\x6e\x0a\x7a\x01\x88\xc5\x45\xde\xec\x63\x69\x7d\x70\xeb\x5d\x56\x6d\x90\x7c\x54\xde\xc0\xb7\x1a\x6b\x65\x3c\xba\x40\x33\x61\x99\x22\xd9\xe4\xfd\x73\x18\x7a\x67\x86\x8c\x66\x07\x98\xca\x39\xca\x34\x6e\x5e\xeb\x96\xfa\x70\x98\x39\xb4\xbe\x7b\x60\xb4\xbe\x63\xb1\x27\x8b\x37\x43\xa7\x0c\x24\x31\x2c\x51\xfc\x1f\x00\x00\xff\xff\xb7\x09\xb9\x49\xf0\x08\x00\x00") +var _runtimePluginsLinterLinterLua = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x8c\x55\x51\x8b\xe3\x36\x10\x7e\xcf\xaf\x18\x44\x0d\xf2\xae\xe5\x2d\xf7\x18\x08\xe5\xba\xb4\x07\xe5\xae\x57\xd8\x6b\xef\xa1\xed\x15\xc5\x1a\x25\xea\xca\x92\x91\xe4\x64\x43\xe9\x7f\x2f\x92\x9c\xc4\xf6\x3a\x47\x17\x16\x2b\x9a\x99\xef\x9b\xf9\x66\x3c\x56\x12\xde\x61\xf8\xd8\x05\x65\x0d\x25\x5a\x99\x80\x8e\x94\xb0\xd9\x80\x51\x1a\xc2\x1e\xcd\x0a\x00\xe0\xad\x10\x33\x9f\x0a\x82\xeb\xb1\x5c\xa1\x11\xab\xd5\x07\xfe\x8c\x8f\xb6\x6d\xb9\x11\xd9\x81\x54\x30\x38\xd6\xf1\x31\xd8\x48\x05\xdf\x96\xab\x95\xec\x4d\x13\xb1\x60\x64\xa2\x65\xe2\x79\xec\xdd\x6f\x0a\x8f\xb4\x5c\x3f\xf1\x03\x52\xc9\xb5\xc7\x6c\x71\xbd\x79\x9f\x00\xe9\xc0\x79\x41\x19\x5b\xa2\xa7\xb6\x0d\xd7\x20\x03\x6c\xae\x70\xf5\xf7\xbd\x5c\xff\xa8\x34\x7e\x3a\x75\x38\xf5\x53\x1a\xe7\x9e\xf5\x2f\x3c\xec\x47\x3e\x02\x0f\xa6\xd7\x1a\x36\x40\x1e\x04\x1e\x1e\xe2\x0f\x92\xec\x4a\xc2\xc7\xa7\xa8\x16\x39\x2a\x23\xec\xd1\x93\xab\x66\xf1\x6f\x14\xf9\xf3\xaf\xef\x73\x4c\xcc\x7e\x88\x8d\x49\x6e\x80\xec\xec\x2c\x2c\x0a\x43\xc9\xce\x6e\x7b\xa5\xa3\x6a\x64\x67\x21\x9d\x81\x59\x20\x50\xd7\x67\xe0\x0a\x48\x21\xd7\x85\x5e\x43\xd1\x92\xf2\x55\xfc\xb9\x15\xf9\x94\x23\x5f\x57\x7a\x01\x29\xc4\xfd\x08\x08\xb5\xc7\x6b\x8e\xba\xe7\x8b\x49\xea\x9e\x37\x7b\x6c\x9e\x53\xc7\x87\x33\x30\x66\x2c\x6b\xac\xb6\x2e\x73\x46\x91\xff\x17\x4b\x77\x0a\x7b\x6b\x16\x89\xba\x93\xd4\xfc\x19\x7d\x24\x3a\x9f\x17\xd0\x6b\xb6\xfe\xee\x16\x7a\xb3\x2c\x73\xd3\x24\x8d\x9a\x06\x98\xf4\x27\x13\xf8\x0b\xb3\x46\x9f\x80\x7d\xe6\x5a\x03\xfb\x8c\x2f\xc1\xf1\x1b\x85\xd4\xb7\x6b\x11\x8b\x6c\xa2\x4d\x0d\x15\xad\x80\xac\xd0\xc6\x4a\x09\xcc\x32\x60\x47\x60\x47\x05\xac\x99\x51\x15\xb4\xd0\x45\xf9\x35\xa6\xbf\xf9\x61\xb9\x39\xd1\x90\x8a\x4b\x87\x85\x12\x00\x9d\xb3\xee\xab\xc0\xbe\x71\xaa\x0b\xcb\xf0\x7e\x3f\x0c\x58\x3e\xcd\x09\xa2\x1b\x42\xa1\xab\xfa\xbe\x1a\x51\x18\x31\x7b\x83\xad\x49\x6f\xfb\x41\xe1\xb1\x3c\xbf\x1a\x4b\x5b\x69\x92\xc2\xfc\xb5\x8f\x99\x5f\x8c\xd7\x3d\xf2\xa8\x91\xbb\xb7\x5a\xbf\xeb\x43\x40\xf7\x01\xbd\xe7\x3b\xf4\xf4\x56\x2a\xa9\xb0\x4c\x58\x41\xd3\x8a\x2a\x2b\x24\xad\x6b\x79\x98\xef\xa8\x84\x3d\x03\xce\xb1\xe5\x2a\xb9\xfe\x64\xb7\x4f\x81\xbb\x40\x13\x12\x21\xc3\xff\xb0\x19\xad\xf9\xe1\x45\x45\xf9\xce\x7c\x13\xaa\xb9\x44\xd1\x97\xda\x3e\x74\x7d\xb8\x11\x71\x5d\x58\x51\x77\x0f\x1b\xf0\x9d\x1e\x05\x91\x3f\x0c\x19\x12\xcb\x6e\x0e\x77\xf8\x02\x9b\x31\xca\x7a\xe7\xfb\x2d\x25\x45\x21\x63\xa2\xb4\xae\x59\x49\xca\xcb\xa5\x4e\x97\x85\xb8\x1f\x5f\xb6\xd9\x33\xde\x25\x6c\x69\x1d\xfc\x55\xa5\xd6\x2b\x03\xaa\xe3\xca\x25\x59\xd0\x97\x20\xec\xa5\x45\x8c\xc1\x27\xa7\x5a\x38\xee\x55\x40\xdf\xf1\x06\xc7\xd3\x15\x77\x72\x7c\xac\x5b\x1e\x9a\x3d\x25\x5f\x0a\x7f\x17\x39\x0a\x7f\xf7\xcd\x68\xd1\x29\x09\x3e\x38\x65\x76\xb5\x54\x46\x24\x96\x2a\x97\x35\x9b\x96\xe9\xc2\x4f\x02\x62\x05\xad\xdf\x45\x95\x32\x42\x66\x1a\x43\x4c\xa2\x95\x84\x2d\xf7\x68\x78\x8b\xf4\xf5\x0e\x4d\x9f\xcc\x8b\x3d\x72\x2c\x24\x30\x9d\x9e\xc9\xe0\x5c\x66\x2e\x58\xd3\xb7\x5b\x74\x29\x91\x32\xa5\x58\xc1\x9b\x69\x2a\xe7\x2f\xc8\xf8\xfc\x7a\x94\x73\xf3\x7d\x70\x15\x78\xec\xca\x49\xdf\x7d\xaf\xe3\xf7\xf1\x9f\x7f\x17\xa6\x81\x12\xfa\xfb\x97\xc2\xff\x99\x9a\x9c\xa7\x82\x5e\x00\x62\x73\x91\x37\xfb\xd8\x5a\x1f\xdc\x7a\x97\x55\x1b\x24\x1f\xb5\x37\xf0\xad\xc6\x5a\x19\x8f\x2e\xd0\x4c\x58\xa5\xc8\x72\xf2\x11\x74\x18\x7a\x67\x86\x8c\x66\x05\x4c\xe5\x1c\x65\x1a\x2f\xaf\x7d\x4b\x73\x38\x2c\x1d\x5a\xdf\x3d\x94\xb4\xbe\x2b\xe3\x4c\x16\x6f\x86\x49\x19\x48\x62\x58\xa2\xf8\x2f\x00\x00\xff\xff\xbe\xc7\x70\x79\xf5\x08\x00\x00") func runtimePluginsLinterLinterLuaBytes() ([]byte, error) { return bindataRead( diff --git a/runtime/plugins/linter/linter.lua b/runtime/plugins/linter/linter.lua index bcb3817c..9fb347f5 100644 --- a/runtime/plugins/linter/linter.lua +++ b/runtime/plugins/linter/linter.lua @@ -22,7 +22,7 @@ function runLinter() elseif ft == "lua" then lint("luacheck", "luacheck --no-color " .. file, "%f:%l:%d+: %m") elseif ft == "python" then - lint("pyflakes", "pyflakes " .. file, "%f:%l: %m") + lint("pyflakes", "pyflakes " .. file, "%f:%l:.-:? %m") elseif ft == "c" then lint("gcc", "gcc -fsyntax-only -Wall -Wextra " .. file, "%f:%l:%d+:.+: %m") elseif ft == "d" then @@ -51,7 +51,7 @@ end function onExit(output, linter, errorformat) local lines = split(output, "\n") - local regex = errorformat:gsub("%%f", "(.+)"):gsub("%%l", "(%d+)"):gsub("%%m", "(.+)") + local regex = errorformat:gsub("%%f", "(..-)"):gsub("%%l", "(%d+)"):gsub("%%m", "(.+)") for _,line in ipairs(lines) do -- Trim whitespace line = line:match("^%s*(.+)%s*$")