{"action":"created","comment":{"url":"https://api.github.com/repos/zalando-incubator/zally/pulls/comments/106854257","pull_request_review_id":27794519,"id":106854257,"diff_hunk":"@@ -0,0 +1,36 @@\n+package de.zalando.zally.rules\n+\n+import com.typesafe.config.Config\n+import de.zalando.zally.Violation\n+import de.zalando.zally.ViolationType\n+import io.swagger.models.Swagger\n+import org.springframework.beans.factory.annotation.Autowired\n+import org.springframework.stereotype.Component\n+\n+@Component\n+class AvoidSynonymsRule(@Autowired rulesConfig: Config) : AbstractRule() {\n+\n+    override val title = \"Use common property names\"\n+    override val url = \"\"\n+    override val violationType = ViolationType.SHOULD\n+\n+    val descPattern = \"Property names should utilize common dictionary\"\n+\n+    @Suppress(\"UNCHECKED_CAST\")\n+    private val commonDictionary = rulesConfig.getConfig(javaClass.simpleName + \".dictionary\").entrySet()\n+            .map { (key, config) -> key to config.unwrapped() as List<String> }\n+\n+    override fun validate(swagger: Swagger): Violation? {\n+        val dict = commonDictionary.flatMap { (canonical, synonyms) -> synonyms.map { it to canonical } }.toMap()","path":"server/src/main/java/de/zalando/zally/rules/AvoidSynonymsRule.kt","position":24,"original_position":24,"commit_id":"13d0cc2825fa8f2d9420383f87b69552d30010ac","original_commit_id":"13d0cc2825fa8f2d9420383f87b69552d30010ac","user":{"login":"fmueller","id":719827,"avatar_url":"https://avatars1.githubusercontent.com/u/719827?v=3","gravatar_id":"","url":"https://api.github.com/users/fmueller","html_url":"https://github.com/fmueller","followers_url":"https://api.github.com/users/fmueller/followers","following_url":"https://api.github.com/users/fmueller/following{/other_user}","gists_url":"https://api.github.com/users/fmueller/gists{/gist_id}","starred_url":"https://api.github.com/users/fmueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fmueller/subscriptions","organizations_url":"https://api.github.com/users/fmueller/orgs","repos_url":"https://api.github.com/users/fmueller/repos","events_url":"https://api.github.com/users/fmueller/events{/privacy}","received_events_url":"https://api.github.com/users/fmueller/received_events","type":"User","site_admin":false},"body":"Minor: please do not use abbreviations for variable names. Having `dict`and `res`here makes it unnecessarily hard to understand what you are doing.","created_at":"2017-03-20T09:08:01Z","updated_at":"2017-03-20T09:13:19Z","html_url":"https://github.com/zalando-incubator/zally/pull/166#discussion_r106854257","pull_request_url":"https://api.github.com/repos/zalando-incubator/zally/pulls/166","_links":{"self":{"href":"https://api.github.com/repos/zalando-incubator/zally/pulls/comments/106854257"},"html":{"href":"https://github.com/zalando-incubator/zally/pull/166#discussion_r106854257"},"pull_request":{"href":"https://api.github.com/repos/zalando-incubator/zally/pulls/166"}}},"pull_request":{"url":"https://api.github.com/repos/zalando-incubator/zally/pulls/166","id":110508468,"html_url":"https://github.com/zalando-incubator/zally/pull/166","diff_url":"https://github.com/zalando-incubator/zally/pull/166.diff","patch_url":"https://github.com/zalando-incubator/zally/pull/166.patch","issue_url":"https://api.github.com/repos/zalando-incubator/zally/issues/166","number":166,"state":"open","locked":false,"title":"97 synonyms rule","user":{"login":"mkulak","id":671355,"avatar_url":"https://avatars2.githubusercontent.com/u/671355?v=3","gravatar_id":"","url":"https://api.github.com/users/mkulak","html_url":"https://github.com/mkulak","followers_url":"https://api.github.com/users/mkulak/followers","following_url":"https://api.github.com/users/mkulak/following{/other_user}","gists_url":"https://api.github.com/users/mkulak/gists{/gist_id}","starred_url":"https://api.github.com/users/mkulak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkulak/subscriptions","organizations_url":"https://api.github.com/users/mkulak/orgs","repos_url":"https://api.github.com/users/mkulak/repos","events_url":"https://api.github.com/users/mkulak/events{/privacy}","received_events_url":"https://api.github.com/users/mkulak/received_events","type":"User","site_admin":false},"body":"Closes #97  \r\n\r\nI also upgraded Kotlin version to 1.1 and made use of new features (I waited for it since #82).","created_at":"2017-03-13T22:07:51Z","updated_at":"2017-03-20T09:13:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dc8a4152933509e895982a08ad26019597a91f09","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/zalando-incubator/zally/pulls/166/commits","review_comments_url":"https://api.github.com/repos/zalando-incubator/zally/pulls/166/comments","review_comment_url":"https://api.github.com/repos/zalando-incubator/zally/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zalando-incubator/zally/issues/166/comments","statuses_url":"https://api.github.com/repos/zalando-incubator/zally/statuses/13d0cc2825fa8f2d9420383f87b69552d30010ac","head":{"label":"zalando-incubator:155-synonims-rule","ref":"155-synonims-rule","sha":"13d0cc2825fa8f2d9420383f87b69552d30010ac","user":{"login":"zalando-incubator","id":18533786,"avatar_url":"https://avatars0.githubusercontent.com/u/18533786?v=3","gravatar_id":"","url":"https://api.github.com/users/zalando-incubator","html_url":"https://github.com/zalando-incubator","followers_url":"https://api.github.com/users/zalando-incubator/followers","following_url":"https://api.github.com/users/zalando-incubator/following{/other_user}","gists_url":"https://api.github.com/users/zalando-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/zalando-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalando-incubator/subscriptions","organizations_url":"https://api.github.com/users/zalando-incubator/orgs","repos_url":"https://api.github.com/users/zalando-incubator/repos","events_url":"https://api.github.com/users/zalando-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/zalando-incubator/received_events","type":"Organization","site_admin":false},"repo":{"id":76853145,"name":"zally","full_name":"zalando-incubator/zally","owner":{"login":"zalando-incubator","id":18533786,"avatar_url":"https://avatars0.githubusercontent.com/u/18533786?v=3","gravatar_id":"","url":"https://api.github.com/users/zalando-incubator","html_url":"https://github.com/zalando-incubator","followers_url":"https://api.github.com/users/zalando-incubator/followers","following_url":"https://api.github.com/users/zalando-incubator/following{/other_user}","gists_url":"https://api.github.com/users/zalando-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/zalando-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalando-incubator/subscriptions","organizations_url":"https://api.github.com/users/zalando-incubator/orgs","repos_url":"https://api.github.com/users/zalando-incubator/repos","events_url":"https://api.github.com/users/zalando-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/zalando-incubator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zalando-incubator/zally","description":"Zalando's API Linter","fork":false,"url":"https://api.github.com/repos/zalando-incubator/zally","forks_url":"https://api.github.com/repos/zalando-incubator/zally/forks","keys_url":"https://api.github.com/repos/zalando-incubator/zally/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zalando-incubator/zally/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zalando-incubator/zally/teams","hooks_url":"https://api.github.com/repos/zalando-incubator/zally/hooks","issue_events_url":"https://api.github.com/repos/zalando-incubator/zally/issues/events{/number}","events_url":"https://api.github.com/repos/zalando-incubator/zally/events","assignees_url":"https://api.github.com/repos/zalando-incubator/zally/assignees{/user}","branches_url":"https://api.github.com/repos/zalando-incubator/zally/branches{/branch}","tags_url":"https://api.github.com/repos/zalando-incubator/zally/tags","blobs_url":"https://api.github.com/repos/zalando-incubator/zally/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zalando-incubator/zally/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zalando-incubator/zally/git/refs{/sha}","trees_url":"https://api.github.com/repos/zalando-incubator/zally/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zalando-incubator/zally/statuses/{sha}","languages_url":"https://api.github.com/repos/zalando-incubator/zally/languages","stargazers_url":"https://api.github.com/repos/zalando-incubator/zally/stargazers","contributors_url":"https://api.github.com/repos/zalando-incubator/zally/contributors","subscribers_url":"https://api.github.com/repos/zalando-incubator/zally/subscribers","subscription_url":"https://api.github.com/repos/zalando-incubator/zally/subscription","commits_url":"https://api.github.com/repos/zalando-incubator/zally/commits{/sha}","git_commits_url":"https://api.github.com/repos/zalando-incubator/zally/git/commits{/sha}","comments_url":"https://api.github.com/repos/zalando-incubator/zally/comments{/number}","issue_comment_url":"https://api.github.com/repos/zalando-incubator/zally/issues/comments{/number}","contents_url":"https://api.github.com/repos/zalando-incubator/zally/contents/{+path}","compare_url":"https://api.github.com/repos/zalando-incubator/zally/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zalando-incubator/zally/merges","archive_url":"https://api.github.com/repos/zalando-incubator/zally/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zalando-incubator/zally/downloads","issues_url":"https://api.github.com/repos/zalando-incubator/zally/issues{/number}","pulls_url":"https://api.github.com/repos/zalando-incubator/zally/pulls{/number}","milestones_url":"https://api.github.com/repos/zalando-incubator/zally/milestones{/number}","notifications_url":"https://api.github.com/repos/zalando-incubator/zally/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zalando-incubator/zally/labels{/name}","releases_url":"https://api.github.com/repos/zalando-incubator/zally/releases{/id}","deployments_url":"https://api.github.com/repos/zalando-incubator/zally/deployments","created_at":"2016-12-19T10:38:18Z","updated_at":"2017-03-15T11:52:58Z","pushed_at":"2017-03-19T22:20:44Z","git_url":"git://github.com/zalando-incubator/zally.git","ssh_url":"git@github.com:zalando-incubator/zally.git","clone_url":"https://github.com/zalando-incubator/zally.git","svn_url":"https://github.com/zalando-incubator/zally","homepage":"","size":1074,"stargazers_count":31,"watchers_count":31,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":29,"forks":4,"open_issues":29,"watchers":31,"default_branch":"master"}},"base":{"label":"zalando-incubator:master","ref":"master","sha":"05dd8d5bfc4342a33980f7f2f52be87bf455132b","user":{"login":"zalando-incubator","id":18533786,"avatar_url":"https://avatars0.githubusercontent.com/u/18533786?v=3","gravatar_id":"","url":"https://api.github.com/users/zalando-incubator","html_url":"https://github.com/zalando-incubator","followers_url":"https://api.github.com/users/zalando-incubator/followers","following_url":"https://api.github.com/users/zalando-incubator/following{/other_user}","gists_url":"https://api.github.com/users/zalando-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/zalando-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalando-incubator/subscriptions","organizations_url":"https://api.github.com/users/zalando-incubator/orgs","repos_url":"https://api.github.com/users/zalando-incubator/repos","events_url":"https://api.github.com/users/zalando-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/zalando-incubator/received_events","type":"Organization","site_admin":false},"repo":{"id":76853145,"name":"zally","full_name":"zalando-incubator/zally","owner":{"login":"zalando-incubator","id":18533786,"avatar_url":"https://avatars0.githubusercontent.com/u/18533786?v=3","gravatar_id":"","url":"https://api.github.com/users/zalando-incubator","html_url":"https://github.com/zalando-incubator","followers_url":"https://api.github.com/users/zalando-incubator/followers","following_url":"https://api.github.com/users/zalando-incubator/following{/other_user}","gists_url":"https://api.github.com/users/zalando-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/zalando-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalando-incubator/subscriptions","organizations_url":"https://api.github.com/users/zalando-incubator/orgs","repos_url":"https://api.github.com/users/zalando-incubator/repos","events_url":"https://api.github.com/users/zalando-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/zalando-incubator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zalando-incubator/zally","description":"Zalando's API Linter","fork":false,"url":"https://api.github.com/repos/zalando-incubator/zally","forks_url":"https://api.github.com/repos/zalando-incubator/zally/forks","keys_url":"https://api.github.com/repos/zalando-incubator/zally/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zalando-incubator/zally/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zalando-incubator/zally/teams","hooks_url":"https://api.github.com/repos/zalando-incubator/zally/hooks","issue_events_url":"https://api.github.com/repos/zalando-incubator/zally/issues/events{/number}","events_url":"https://api.github.com/repos/zalando-incubator/zally/events","assignees_url":"https://api.github.com/repos/zalando-incubator/zally/assignees{/user}","branches_url":"https://api.github.com/repos/zalando-incubator/zally/branches{/branch}","tags_url":"https://api.github.com/repos/zalando-incubator/zally/tags","blobs_url":"https://api.github.com/repos/zalando-incubator/zally/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zalando-incubator/zally/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zalando-incubator/zally/git/refs{/sha}","trees_url":"https://api.github.com/repos/zalando-incubator/zally/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zalando-incubator/zally/statuses/{sha}","languages_url":"https://api.github.com/repos/zalando-incubator/zally/languages","stargazers_url":"https://api.github.com/repos/zalando-incubator/zally/stargazers","contributors_url":"https://api.github.com/repos/zalando-incubator/zally/contributors","subscribers_url":"https://api.github.com/repos/zalando-incubator/zally/subscribers","subscription_url":"https://api.github.com/repos/zalando-incubator/zally/subscription","commits_url":"https://api.github.com/repos/zalando-incubator/zally/commits{/sha}","git_commits_url":"https://api.github.com/repos/zalando-incubator/zally/git/commits{/sha}","comments_url":"https://api.github.com/repos/zalando-incubator/zally/comments{/number}","issue_comment_url":"https://api.github.com/repos/zalando-incubator/zally/issues/comments{/number}","contents_url":"https://api.github.com/repos/zalando-incubator/zally/contents/{+path}","compare_url":"https://api.github.com/repos/zalando-incubator/zally/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zalando-incubator/zally/merges","archive_url":"https://api.github.com/repos/zalando-incubator/zally/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zalando-incubator/zally/downloads","issues_url":"https://api.github.com/repos/zalando-incubator/zally/issues{/number}","pulls_url":"https://api.github.com/repos/zalando-incubator/zally/pulls{/number}","milestones_url":"https://api.github.com/repos/zalando-incubator/zally/milestones{/number}","notifications_url":"https://api.github.com/repos/zalando-incubator/zally/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zalando-incubator/zally/labels{/name}","releases_url":"https://api.github.com/repos/zalando-incubator/zally/releases{/id}","deployments_url":"https://api.github.com/repos/zalando-incubator/zally/deployments","created_at":"2016-12-19T10:38:18Z","updated_at":"2017-03-15T11:52:58Z","pushed_at":"2017-03-19T22:20:44Z","git_url":"git://github.com/zalando-incubator/zally.git","ssh_url":"git@github.com:zalando-incubator/zally.git","clone_url":"https://github.com/zalando-incubator/zally.git","svn_url":"https://github.com/zalando-incubator/zally","homepage":"","size":1074,"stargazers_count":31,"watchers_count":31,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":29,"forks":4,"open_issues":29,"watchers":31,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zalando-incubator/zally/pulls/166"},"html":{"href":"https://github.com/zalando-incubator/zally/pull/166"},"issue":{"href":"https://api.github.com/repos/zalando-incubator/zally/issues/166"},"comments":{"href":"https://api.github.com/repos/zalando-incubator/zally/issues/166/comments"},"review_comments":{"href":"https://api.github.com/repos/zalando-incubator/zally/pulls/166/comments"},"review_comment":{"href":"https://api.github.com/repos/zalando-incubator/zally/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zalando-incubator/zally/pulls/166/commits"},"statuses":{"href":"https://api.github.com/repos/zalando-incubator/zally/statuses/13d0cc2825fa8f2d9420383f87b69552d30010ac"}}}}
{"actor":{"display_login":"fmueller"}}