{"action":"opened","issue":{"url":"https://api.github.com/repos/angelozerr/tern-jshint/issues/6","labels_url":"https://api.github.com/repos/angelozerr/tern-jshint/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/angelozerr/tern-jshint/issues/6/comments","events_url":"https://api.github.com/repos/angelozerr/tern-jshint/issues/6/events","html_url":"https://github.com/angelozerr/tern-jshint/issues/6","id":128667262,"number":6,"title":"tern-jshint used along with tern.java marks all problems as errors (even warnings)","user":{"login":"orlandoibm","id":12703353,"avatar_url":"https://avatars.githubusercontent.com/u/12703353?v=3","gravatar_id":"","url":"https://api.github.com/users/orlandoibm","html_url":"https://github.com/orlandoibm","followers_url":"https://api.github.com/users/orlandoibm/followers","following_url":"https://api.github.com/users/orlandoibm/following{/other_user}","gists_url":"https://api.github.com/users/orlandoibm/gists{/gist_id}","starred_url":"https://api.github.com/users/orlandoibm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orlandoibm/subscriptions","organizations_url":"https://api.github.com/users/orlandoibm/orgs","repos_url":"https://api.github.com/users/orlandoibm/repos","events_url":"https://api.github.com/users/orlandoibm/events{/privacy}","received_events_url":"https://api.github.com/users/orlandoibm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-25T23:02:18Z","updated_at":"2016-01-25T23:02:18Z","closed_at":null,"body":"Doing a deeper investigation, it seems that issue classification is done using an integer, while the actual values returned by jshint are strings.\r\n\r\nLook here:\r\nhttps://github.com/angelozerr/tern-jshint/blob/master/jshint.js#L224\r\n\r\nFor example this jshint query:\r\n-----------------------------------\r\n```json\r\n{\"query\":{\"type\":\"jshint\",\"file\":\"app.js\"},\"files\":[{\"name\":\"app.js\",\"text\":\"var http = require('http');\\n\\nvar port = (process.env.PORT || process.env.VCAP_APP_PORT || 8888);\\n\\nhttp.createServer(function (req, res) {\\n\\tres.writeHead(200, {'Content-Type': 'text/plain'});\\n\\tres.end('Hello World!\\\\n');\\n}).listen(port);;\\n\\nconsole.log('Server running at http://127.0.0.1:'+port)\\n\\nconsole.log (\\\"Hola\\\");\",\"type\":\"full\"}]}\r\n```\r\nThe tern result is:\r\n```json\r\n{\"messages\":[{\"message\":\"Unnecessary semicolon.\",\"severity\":\"warning\",\"from\":235,\"to\":236,\"file\":\"app.js\"},{\"message\":\"Missing semicolon.\",\"severity\":\"error\",\"from\":293,\"to\":294,\"file\":\"app.js\"}]}\r\n```\r\n\r\nLooking at the \"severity\" field, those are strings (\"warning\", \"error\"), but the classification (switch) is done through numeric values (1, 2) which is causing this issue."}}