{"action":"created","comment":{"url":"https://api.github.com/repos/SonarSource/sonar-go/pulls/comments/170853501","pull_request_review_id":99601518,"id":170853501,"diff_hunk":"@@ -0,0 +1,34 @@\n+package org.sonar.commonruleengine;\n+\n+import org.sonar.commonruleengine.rules.CommonRule;\n+import org.sonar.uast.UastNode;\n+\n+public class Issue {\n+\n+  private final String message;\n+  private final CommonRule rule;\n+  private final UastNode node;\n+\n+  public Issue(CommonRule rule, UastNode node, String message) {\n+    this.message = message;\n+    this.node = node;\n+    this.rule = rule;\n+  }\n+\n+  public String getMessage() {\n+    return message;\n+  }\n+\n+  public CommonRule getRule() {\n+    return rule;\n+  }\n+\n+  public UastNode getNode() {\n+    return node;\n+  }\n+\n+  @Override\n+  public String toString() {\n+    return String.format(\"%s %s: %s\", node, rule.getClass().getSimpleName(), message);","path":"common-rule-engine/src/main/java/org/sonar/commonruleengine/Issue.java","position":32,"original_position":32,"commit_id":"cfc2724d0d540fdacc3c64d4ebd1f4cf8c27eca6","original_commit_id":"cfc2724d0d540fdacc3c64d4ebd1f4cf8c27eca6","user":{"login":"m-g-sonar","id":10588758,"avatar_url":"https://avatars2.githubusercontent.com/u/10588758?v=4","gravatar_id":"","url":"https://api.github.com/users/m-g-sonar","html_url":"https://github.com/m-g-sonar","followers_url":"https://api.github.com/users/m-g-sonar/followers","following_url":"https://api.github.com/users/m-g-sonar/following{/other_user}","gists_url":"https://api.github.com/users/m-g-sonar/gists{/gist_id}","starred_url":"https://api.github.com/users/m-g-sonar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-g-sonar/subscriptions","organizations_url":"https://api.github.com/users/m-g-sonar/orgs","repos_url":"https://api.github.com/users/m-g-sonar/repos","events_url":"https://api.github.com/users/m-g-sonar/events{/privacy}","received_events_url":"https://api.github.com/users/m-g-sonar/received_events","type":"User","site_admin":false},"body":"I would display the position here, by explicitly declaring the `toString()` method from `Node`","created_at":"2018-02-27T09:02:29Z","updated_at":"2018-02-27T09:02:29Z","html_url":"https://github.com/SonarSource/sonar-go/pull/1#discussion_r170853501","pull_request_url":"https://api.github.com/repos/SonarSource/sonar-go/pulls/1","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/SonarSource/sonar-go/pulls/comments/170853501"},"html":{"href":"https://github.com/SonarSource/sonar-go/pull/1#discussion_r170853501"},"pull_request":{"href":"https://api.github.com/repos/SonarSource/sonar-go/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/SonarSource/sonar-go/pulls/1","id":171424908,"html_url":"https://github.com/SonarSource/sonar-go/pull/1","diff_url":"https://github.com/SonarSource/sonar-go/pull/1.diff","patch_url":"https://github.com/SonarSource/sonar-go/pull/1.patch","issue_url":"https://api.github.com/repos/SonarSource/sonar-go/issues/1","number":1,"state":"open","locked":false,"title":"Rule engine","user":{"login":"saberduck","id":680437,"avatar_url":"https://avatars1.githubusercontent.com/u/680437?v=4","gravatar_id":"","url":"https://api.github.com/users/saberduck","html_url":"https://github.com/saberduck","followers_url":"https://api.github.com/users/saberduck/followers","following_url":"https://api.github.com/users/saberduck/following{/other_user}","gists_url":"https://api.github.com/users/saberduck/gists{/gist_id}","starred_url":"https://api.github.com/users/saberduck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saberduck/subscriptions","organizations_url":"https://api.github.com/users/saberduck/orgs","repos_url":"https://api.github.com/users/saberduck/repos","events_url":"https://api.github.com/users/saberduck/events{/privacy}","received_events_url":"https://api.github.com/users/saberduck/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-02-26T16:30:27Z","updated_at":"2018-02-27T09:02:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e9fa86605dc94be966b8777078ba2f02b9c25edf","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/SonarSource/sonar-go/pulls/1/commits","review_comments_url":"https://api.github.com/repos/SonarSource/sonar-go/pulls/1/comments","review_comment_url":"https://api.github.com/repos/SonarSource/sonar-go/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SonarSource/sonar-go/issues/1/comments","statuses_url":"https://api.github.com/repos/SonarSource/sonar-go/statuses/cfc2724d0d540fdacc3c64d4ebd1f4cf8c27eca6","head":{"label":"SonarSource:rule_engine","ref":"rule_engine","sha":"cfc2724d0d540fdacc3c64d4ebd1f4cf8c27eca6","user":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars0.githubusercontent.com/u/545988?v=4","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"repo":{"id":122954189,"name":"sonar-go","full_name":"SonarSource/sonar-go","owner":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars0.githubusercontent.com/u/545988?v=4","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SonarSource/sonar-go","description":null,"fork":false,"url":"https://api.github.com/repos/SonarSource/sonar-go","forks_url":"https://api.github.com/repos/SonarSource/sonar-go/forks","keys_url":"https://api.github.com/repos/SonarSource/sonar-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SonarSource/sonar-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SonarSource/sonar-go/teams","hooks_url":"https://api.github.com/repos/SonarSource/sonar-go/hooks","issue_events_url":"https://api.github.com/repos/SonarSource/sonar-go/issues/events{/number}","events_url":"https://api.github.com/repos/SonarSource/sonar-go/events","assignees_url":"https://api.github.com/repos/SonarSource/sonar-go/assignees{/user}","branches_url":"https://api.github.com/repos/SonarSource/sonar-go/branches{/branch}","tags_url":"https://api.github.com/repos/SonarSource/sonar-go/tags","blobs_url":"https://api.github.com/repos/SonarSource/sonar-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SonarSource/sonar-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SonarSource/sonar-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/SonarSource/sonar-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SonarSource/sonar-go/statuses/{sha}","languages_url":"https://api.github.com/repos/SonarSource/sonar-go/languages","stargazers_url":"https://api.github.com/repos/SonarSource/sonar-go/stargazers","contributors_url":"https://api.github.com/repos/SonarSource/sonar-go/contributors","subscribers_url":"https://api.github.com/repos/SonarSource/sonar-go/subscribers","subscription_url":"https://api.github.com/repos/SonarSource/sonar-go/subscription","commits_url":"https://api.github.com/repos/SonarSource/sonar-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/SonarSource/sonar-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/SonarSource/sonar-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/SonarSource/sonar-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/SonarSource/sonar-go/contents/{+path}","compare_url":"https://api.github.com/repos/SonarSource/sonar-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SonarSource/sonar-go/merges","archive_url":"https://api.github.com/repos/SonarSource/sonar-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SonarSource/sonar-go/downloads","issues_url":"https://api.github.com/repos/SonarSource/sonar-go/issues{/number}","pulls_url":"https://api.github.com/repos/SonarSource/sonar-go/pulls{/number}","milestones_url":"https://api.github.com/repos/SonarSource/sonar-go/milestones{/number}","notifications_url":"https://api.github.com/repos/SonarSource/sonar-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SonarSource/sonar-go/labels{/name}","releases_url":"https://api.github.com/repos/SonarSource/sonar-go/releases{/id}","deployments_url":"https://api.github.com/repos/SonarSource/sonar-go/deployments","created_at":"2018-02-26T10:33:29Z","updated_at":"2018-02-27T08:24:49Z","pushed_at":"2018-02-27T06:35:11Z","git_url":"git://github.com/SonarSource/sonar-go.git","ssh_url":"git@github.com:SonarSource/sonar-go.git","clone_url":"https://github.com/SonarSource/sonar-go.git","svn_url":"https://github.com/SonarSource/sonar-go","homepage":null,"size":63,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"SonarSource:master","ref":"master","sha":"d8723391e73232d7ade6b6be9937b9110df0cc88","user":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars0.githubusercontent.com/u/545988?v=4","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"repo":{"id":122954189,"name":"sonar-go","full_name":"SonarSource/sonar-go","owner":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars0.githubusercontent.com/u/545988?v=4","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SonarSource/sonar-go","description":null,"fork":false,"url":"https://api.github.com/repos/SonarSource/sonar-go","forks_url":"https://api.github.com/repos/SonarSource/sonar-go/forks","keys_url":"https://api.github.com/repos/SonarSource/sonar-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SonarSource/sonar-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SonarSource/sonar-go/teams","hooks_url":"https://api.github.com/repos/SonarSource/sonar-go/hooks","issue_events_url":"https://api.github.com/repos/SonarSource/sonar-go/issues/events{/number}","events_url":"https://api.github.com/repos/SonarSource/sonar-go/events","assignees_url":"https://api.github.com/repos/SonarSource/sonar-go/assignees{/user}","branches_url":"https://api.github.com/repos/SonarSource/sonar-go/branches{/branch}","tags_url":"https://api.github.com/repos/SonarSource/sonar-go/tags","blobs_url":"https://api.github.com/repos/SonarSource/sonar-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SonarSource/sonar-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SonarSource/sonar-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/SonarSource/sonar-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SonarSource/sonar-go/statuses/{sha}","languages_url":"https://api.github.com/repos/SonarSource/sonar-go/languages","stargazers_url":"https://api.github.com/repos/SonarSource/sonar-go/stargazers","contributors_url":"https://api.github.com/repos/SonarSource/sonar-go/contributors","subscribers_url":"https://api.github.com/repos/SonarSource/sonar-go/subscribers","subscription_url":"https://api.github.com/repos/SonarSource/sonar-go/subscription","commits_url":"https://api.github.com/repos/SonarSource/sonar-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/SonarSource/sonar-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/SonarSource/sonar-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/SonarSource/sonar-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/SonarSource/sonar-go/contents/{+path}","compare_url":"https://api.github.com/repos/SonarSource/sonar-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SonarSource/sonar-go/merges","archive_url":"https://api.github.com/repos/SonarSource/sonar-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SonarSource/sonar-go/downloads","issues_url":"https://api.github.com/repos/SonarSource/sonar-go/issues{/number}","pulls_url":"https://api.github.com/repos/SonarSource/sonar-go/pulls{/number}","milestones_url":"https://api.github.com/repos/SonarSource/sonar-go/milestones{/number}","notifications_url":"https://api.github.com/repos/SonarSource/sonar-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SonarSource/sonar-go/labels{/name}","releases_url":"https://api.github.com/repos/SonarSource/sonar-go/releases{/id}","deployments_url":"https://api.github.com/repos/SonarSource/sonar-go/deployments","created_at":"2018-02-26T10:33:29Z","updated_at":"2018-02-27T08:24:49Z","pushed_at":"2018-02-27T06:35:11Z","git_url":"git://github.com/SonarSource/sonar-go.git","ssh_url":"git@github.com:SonarSource/sonar-go.git","clone_url":"https://github.com/SonarSource/sonar-go.git","svn_url":"https://github.com/SonarSource/sonar-go","homepage":null,"size":63,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SonarSource/sonar-go/pulls/1"},"html":{"href":"https://github.com/SonarSource/sonar-go/pull/1"},"issue":{"href":"https://api.github.com/repos/SonarSource/sonar-go/issues/1"},"comments":{"href":"https://api.github.com/repos/SonarSource/sonar-go/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/SonarSource/sonar-go/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/SonarSource/sonar-go/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SonarSource/sonar-go/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/SonarSource/sonar-go/statuses/cfc2724d0d540fdacc3c64d4ebd1f4cf8c27eca6"}},"author_association":"NONE"}}
{"actor":{"display_login":"m-g-sonar"}}