{"action":"created","comment":{"url":"https://api.github.com/repos/SonarSource/sonar-javascript/pulls/comments/66282733","id":66282733,"diff_hunk":"@@ -0,0 +1,59 @@\n+/*\n+ * SonarQube JavaScript Plugin\n+ * Copyright (C) 2011-2016 SonarSource SA\n+ * mailto:contact AT sonarsource DOT com\n+ *\n+ * This program is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 3 of the License, or (at your option) any later version.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public License\n+ * along with this program; if not, write to the Free Software Foundation,\n+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n+ */\n+package org.sonar.javascript.checks;\n+\n+import org.sonar.check.Priority;\n+import org.sonar.check.Rule;\n+import org.sonar.plugins.javascript.api.tree.Tree.Kind;\n+import org.sonar.plugins.javascript.api.tree.expression.ExpressionTree;\n+import org.sonar.plugins.javascript.api.tree.statement.CaseClauseTree;\n+import org.sonar.plugins.javascript.api.visitors.DoubleDispatchVisitorCheck;\n+import org.sonar.squidbridge.annotations.ActivatedByDefault;\n+import org.sonar.squidbridge.annotations.SqaleConstantRemediation;\n+\n+@Rule(\n+  key = \"S3616\",\n+  name = \"Do not use the comma operator within a switch case\",\n+  priority = Priority.MAJOR,\n+  tags = {Tags.BUG})\n+@ActivatedByDefault\n+@SqaleConstantRemediation(\"5min\")\n+public class NoCommaOperatorInSwitchCaseCheck extends DoubleDispatchVisitorCheck {","path":"javascript-checks/src/main/java/org/sonar/javascript/checks/NoCommaOperatorInSwitchCaseCheck.java","position":38,"original_position":38,"commit_id":"ce5402a59f1f57f998933fe20c3851480d30bf65","original_commit_id":"ce5402a59f1f57f998933fe20c3851480d30bf65","user":{"login":"ivandalbosco","id":19170614,"avatar_url":"https://avatars.githubusercontent.com/u/19170614?v=3","gravatar_id":"","url":"https://api.github.com/users/ivandalbosco","html_url":"https://github.com/ivandalbosco","followers_url":"https://api.github.com/users/ivandalbosco/followers","following_url":"https://api.github.com/users/ivandalbosco/following{/other_user}","gists_url":"https://api.github.com/users/ivandalbosco/gists{/gist_id}","starred_url":"https://api.github.com/users/ivandalbosco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivandalbosco/subscriptions","organizations_url":"https://api.github.com/users/ivandalbosco/orgs","repos_url":"https://api.github.com/users/ivandalbosco/repos","events_url":"https://api.github.com/users/ivandalbosco/events{/privacy}","received_events_url":"https://api.github.com/users/ivandalbosco/received_events","type":"User","site_admin":false},"body":"git ce5402a5","created_at":"2016-06-08T15:50:39Z","updated_at":"2016-06-08T15:50:39Z","html_url":"https://github.com/SonarSource/sonar-javascript/pull/273#discussion_r66282733","pull_request_url":"https://api.github.com/repos/SonarSource/sonar-javascript/pulls/273","_links":{"self":{"href":"https://api.github.com/repos/SonarSource/sonar-javascript/pulls/comments/66282733"},"html":{"href":"https://github.com/SonarSource/sonar-javascript/pull/273#discussion_r66282733"},"pull_request":{"href":"https://api.github.com/repos/SonarSource/sonar-javascript/pulls/273"}}},"pull_request":{"url":"https://api.github.com/repos/SonarSource/sonar-javascript/pulls/273","id":73036913,"html_url":"https://github.com/SonarSource/sonar-javascript/pull/273","diff_url":"https://github.com/SonarSource/sonar-javascript/pull/273.diff","patch_url":"https://github.com/SonarSource/sonar-javascript/pull/273.patch","issue_url":"https://api.github.com/repos/SonarSource/sonar-javascript/issues/273","number":273,"state":"open","locked":false,"title":"SONARJS-701 Rule: Comma operator should not be used in switch-case expression","user":{"login":"ivandalbosco","id":19170614,"avatar_url":"https://avatars.githubusercontent.com/u/19170614?v=3","gravatar_id":"","url":"https://api.github.com/users/ivandalbosco","html_url":"https://github.com/ivandalbosco","followers_url":"https://api.github.com/users/ivandalbosco/followers","following_url":"https://api.github.com/users/ivandalbosco/following{/other_user}","gists_url":"https://api.github.com/users/ivandalbosco/gists{/gist_id}","starred_url":"https://api.github.com/users/ivandalbosco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivandalbosco/subscriptions","organizations_url":"https://api.github.com/users/ivandalbosco/orgs","repos_url":"https://api.github.com/users/ivandalbosco/repos","events_url":"https://api.github.com/users/ivandalbosco/events{/privacy}","received_events_url":"https://api.github.com/users/ivandalbosco/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-08T12:26:17Z","updated_at":"2016-06-08T15:50:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e4a71e149af8ebe157e254a68ac98d28328c1658","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SonarSource/sonar-javascript/pulls/273/commits","review_comments_url":"https://api.github.com/repos/SonarSource/sonar-javascript/pulls/273/comments","review_comment_url":"https://api.github.com/repos/SonarSource/sonar-javascript/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SonarSource/sonar-javascript/issues/273/comments","statuses_url":"https://api.github.com/repos/SonarSource/sonar-javascript/statuses/ce5402a59f1f57f998933fe20c3851480d30bf65","head":{"label":"SonarSource:SONARJS-701","ref":"SONARJS-701","sha":"ce5402a59f1f57f998933fe20c3851480d30bf65","user":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars.githubusercontent.com/u/545988?v=3","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":4335519,"name":"sonar-javascript","full_name":"SonarSource/sonar-javascript","owner":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars.githubusercontent.com/u/545988?v=3","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-javascript","description":"JavaScript Analyzer for SonarQube","fork":false,"url":"https://api.github.com/repos/SonarSource/sonar-javascript","forks_url":"https://api.github.com/repos/SonarSource/sonar-javascript/forks","keys_url":"https://api.github.com/repos/SonarSource/sonar-javascript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SonarSource/sonar-javascript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SonarSource/sonar-javascript/teams","hooks_url":"https://api.github.com/repos/SonarSource/sonar-javascript/hooks","issue_events_url":"https://api.github.com/repos/SonarSource/sonar-javascript/issues/events{/number}","events_url":"https://api.github.com/repos/SonarSource/sonar-javascript/events","assignees_url":"https://api.github.com/repos/SonarSource/sonar-javascript/assignees{/user}","branches_url":"https://api.github.com/repos/SonarSource/sonar-javascript/branches{/branch}","tags_url":"https://api.github.com/repos/SonarSource/sonar-javascript/tags","blobs_url":"https://api.github.com/repos/SonarSource/sonar-javascript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SonarSource/sonar-javascript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SonarSource/sonar-javascript/git/refs{/sha}","trees_url":"https://api.github.com/repos/SonarSource/sonar-javascript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SonarSource/sonar-javascript/statuses/{sha}","languages_url":"https://api.github.com/repos/SonarSource/sonar-javascript/languages","stargazers_url":"https://api.github.com/repos/SonarSource/sonar-javascript/stargazers","contributors_url":"https://api.github.com/repos/SonarSource/sonar-javascript/contributors","subscribers_url":"https://api.github.com/repos/SonarSource/sonar-javascript/subscribers","subscription_url":"https://api.github.com/repos/SonarSource/sonar-javascript/subscription","commits_url":"https://api.github.com/repos/SonarSource/sonar-javascript/commits{/sha}","git_commits_url":"https://api.github.com/repos/SonarSource/sonar-javascript/git/commits{/sha}","comments_url":"https://api.github.com/repos/SonarSource/sonar-javascript/comments{/number}","issue_comment_url":"https://api.github.com/repos/SonarSource/sonar-javascript/issues/comments{/number}","contents_url":"https://api.github.com/repos/SonarSource/sonar-javascript/contents/{+path}","compare_url":"https://api.github.com/repos/SonarSource/sonar-javascript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SonarSource/sonar-javascript/merges","archive_url":"https://api.github.com/repos/SonarSource/sonar-javascript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SonarSource/sonar-javascript/downloads","issues_url":"https://api.github.com/repos/SonarSource/sonar-javascript/issues{/number}","pulls_url":"https://api.github.com/repos/SonarSource/sonar-javascript/pulls{/number}","milestones_url":"https://api.github.com/repos/SonarSource/sonar-javascript/milestones{/number}","notifications_url":"https://api.github.com/repos/SonarSource/sonar-javascript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SonarSource/sonar-javascript/labels{/name}","releases_url":"https://api.github.com/repos/SonarSource/sonar-javascript/releases{/id}","deployments_url":"https://api.github.com/repos/SonarSource/sonar-javascript/deployments","created_at":"2012-05-15T12:35:38Z","updated_at":"2016-06-06T23:47:32Z","pushed_at":"2016-06-08T14:25:01Z","git_url":"git://github.com/SonarSource/sonar-javascript.git","ssh_url":"git@github.com:SonarSource/sonar-javascript.git","clone_url":"https://github.com/SonarSource/sonar-javascript.git","svn_url":"https://github.com/SonarSource/sonar-javascript","homepage":"http://docs.sonarqube.org/display/PLUG/JavaScript+Plugin","size":12390,"stargazers_count":75,"watchers_count":75,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":62,"mirror_url":null,"open_issues_count":4,"forks":62,"open_issues":4,"watchers":75,"default_branch":"master"}},"base":{"label":"SonarSource:master","ref":"master","sha":"303fa3791916f9ba858e9b1be20a401f685afc40","user":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars.githubusercontent.com/u/545988?v=3","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":4335519,"name":"sonar-javascript","full_name":"SonarSource/sonar-javascript","owner":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars.githubusercontent.com/u/545988?v=3","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-javascript","description":"JavaScript Analyzer for SonarQube","fork":false,"url":"https://api.github.com/repos/SonarSource/sonar-javascript","forks_url":"https://api.github.com/repos/SonarSource/sonar-javascript/forks","keys_url":"https://api.github.com/repos/SonarSource/sonar-javascript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SonarSource/sonar-javascript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SonarSource/sonar-javascript/teams","hooks_url":"https://api.github.com/repos/SonarSource/sonar-javascript/hooks","issue_events_url":"https://api.github.com/repos/SonarSource/sonar-javascript/issues/events{/number}","events_url":"https://api.github.com/repos/SonarSource/sonar-javascript/events","assignees_url":"https://api.github.com/repos/SonarSource/sonar-javascript/assignees{/user}","branches_url":"https://api.github.com/repos/SonarSource/sonar-javascript/branches{/branch}","tags_url":"https://api.github.com/repos/SonarSource/sonar-javascript/tags","blobs_url":"https://api.github.com/repos/SonarSource/sonar-javascript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SonarSource/sonar-javascript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SonarSource/sonar-javascript/git/refs{/sha}","trees_url":"https://api.github.com/repos/SonarSource/sonar-javascript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SonarSource/sonar-javascript/statuses/{sha}","languages_url":"https://api.github.com/repos/SonarSource/sonar-javascript/languages","stargazers_url":"https://api.github.com/repos/SonarSource/sonar-javascript/stargazers","contributors_url":"https://api.github.com/repos/SonarSource/sonar-javascript/contributors","subscribers_url":"https://api.github.com/repos/SonarSource/sonar-javascript/subscribers","subscription_url":"https://api.github.com/repos/SonarSource/sonar-javascript/subscription","commits_url":"https://api.github.com/repos/SonarSource/sonar-javascript/commits{/sha}","git_commits_url":"https://api.github.com/repos/SonarSource/sonar-javascript/git/commits{/sha}","comments_url":"https://api.github.com/repos/SonarSource/sonar-javascript/comments{/number}","issue_comment_url":"https://api.github.com/repos/SonarSource/sonar-javascript/issues/comments{/number}","contents_url":"https://api.github.com/repos/SonarSource/sonar-javascript/contents/{+path}","compare_url":"https://api.github.com/repos/SonarSource/sonar-javascript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SonarSource/sonar-javascript/merges","archive_url":"https://api.github.com/repos/SonarSource/sonar-javascript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SonarSource/sonar-javascript/downloads","issues_url":"https://api.github.com/repos/SonarSource/sonar-javascript/issues{/number}","pulls_url":"https://api.github.com/repos/SonarSource/sonar-javascript/pulls{/number}","milestones_url":"https://api.github.com/repos/SonarSource/sonar-javascript/milestones{/number}","notifications_url":"https://api.github.com/repos/SonarSource/sonar-javascript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SonarSource/sonar-javascript/labels{/name}","releases_url":"https://api.github.com/repos/SonarSource/sonar-javascript/releases{/id}","deployments_url":"https://api.github.com/repos/SonarSource/sonar-javascript/deployments","created_at":"2012-05-15T12:35:38Z","updated_at":"2016-06-06T23:47:32Z","pushed_at":"2016-06-08T14:25:01Z","git_url":"git://github.com/SonarSource/sonar-javascript.git","ssh_url":"git@github.com:SonarSource/sonar-javascript.git","clone_url":"https://github.com/SonarSource/sonar-javascript.git","svn_url":"https://github.com/SonarSource/sonar-javascript","homepage":"http://docs.sonarqube.org/display/PLUG/JavaScript+Plugin","size":12390,"stargazers_count":75,"watchers_count":75,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":62,"mirror_url":null,"open_issues_count":4,"forks":62,"open_issues":4,"watchers":75,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SonarSource/sonar-javascript/pulls/273"},"html":{"href":"https://github.com/SonarSource/sonar-javascript/pull/273"},"issue":{"href":"https://api.github.com/repos/SonarSource/sonar-javascript/issues/273"},"comments":{"href":"https://api.github.com/repos/SonarSource/sonar-javascript/issues/273/comments"},"review_comments":{"href":"https://api.github.com/repos/SonarSource/sonar-javascript/pulls/273/comments"},"review_comment":{"href":"https://api.github.com/repos/SonarSource/sonar-javascript/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SonarSource/sonar-javascript/pulls/273/commits"},"statuses":{"href":"https://api.github.com/repos/SonarSource/sonar-javascript/statuses/ce5402a59f1f57f998933fe20c3851480d30bf65"}}}}
{"actor":{"display_login":"ivandalbosco"}}