{"action":"closed","issue":{"url":"https://api.github.com/repos/SonarOpenCommunity/sonar-cxx/issues/838","repository_url":"https://api.github.com/repos/SonarOpenCommunity/sonar-cxx","labels_url":"https://api.github.com/repos/SonarOpenCommunity/sonar-cxx/issues/838/labels{/name}","comments_url":"https://api.github.com/repos/SonarOpenCommunity/sonar-cxx/issues/838/comments","events_url":"https://api.github.com/repos/SonarOpenCommunity/sonar-cxx/issues/838/events","html_url":"https://github.com/SonarOpenCommunity/sonar-cxx/issues/838","id":148929771,"number":838,"title":"preprocessor error messages not helpful","user":{"login":"Bertk","id":2315215,"avatar_url":"https://avatars.githubusercontent.com/u/2315215?v=3","gravatar_id":"","url":"https://api.github.com/users/Bertk","html_url":"https://github.com/Bertk","followers_url":"https://api.github.com/users/Bertk/followers","following_url":"https://api.github.com/users/Bertk/following{/other_user}","gists_url":"https://api.github.com/users/Bertk/gists{/gist_id}","starred_url":"https://api.github.com/users/Bertk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bertk/subscriptions","organizations_url":"https://api.github.com/users/Bertk/orgs","repos_url":"https://api.github.com/users/Bertk/repos","events_url":"https://api.github.com/users/Bertk/events{/privacy}","received_events_url":"https://api.github.com/users/Bertk/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/SonarOpenCommunity/sonar-cxx/labels/discussion","name":"discussion","color":"eb6420"},{"url":"https://api.github.com/repos/SonarOpenCommunity/sonar-cxx/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2016-04-17T08:28:43Z","updated_at":"2016-05-05T07:49:34Z","closed_at":"2016-05-05T07:49:34Z","body":"I recognized some useless messages like\r\n```\r\nERROR: Mismatch: expected ',' got: ')'\r\nERROR: Mismatch: expected ',' got: ')'\r\nERROR: Mismatch: expected ',' got: ')'\r\n```\r\nThe error message should also refer or print the source code line (sonar-cxx/cxx-squid/src/main/java/org/sonar/cxx/preprocessor/CxxPreprocessor.java, line 761):\r\n```java\r\n  private List<Token> match(List<Token> tokens, String str) throws MismatchException {\r\n    if (!tokens.get(0).getValue().equals(str)) {\r\n      LOG.error(\"Mismatch: expected '\" + str + \"' got: '\" + tokens.get(0).getValue() + \"'\");\r\n      throw new MismatchException(\"Mismatch: expected '\" + str + \"' got: '\"\r\n        + tokens.get(0).getValue() + \"'\");\r\n    }\r\n    return tokens.subList(1, tokens.size());\r\n  }\r\n```"}}