{"action":"created","issue":{"url":"https://api.github.com/repos/mibk/dupl/issues/13","repository_url":"https://api.github.com/repos/mibk/dupl","labels_url":"https://api.github.com/repos/mibk/dupl/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/mibk/dupl/issues/13/comments","events_url":"https://api.github.com/repos/mibk/dupl/issues/13/events","html_url":"https://github.com/mibk/dupl/issues/13","id":128209584,"number":13,"title":"Allow disabling of check with in code comments","user":{"login":"scags9876","id":2413768,"avatar_url":"https://avatars.githubusercontent.com/u/2413768?v=3","gravatar_id":"","url":"https://api.github.com/users/scags9876","html_url":"https://github.com/scags9876","followers_url":"https://api.github.com/users/scags9876/followers","following_url":"https://api.github.com/users/scags9876/following{/other_user}","gists_url":"https://api.github.com/users/scags9876/gists{/gist_id}","starred_url":"https://api.github.com/users/scags9876/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scags9876/subscriptions","organizations_url":"https://api.github.com/users/scags9876/orgs","repos_url":"https://api.github.com/users/scags9876/repos","events_url":"https://api.github.com/users/scags9876/events{/privacy}","received_events_url":"https://api.github.com/users/scags9876/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-01-22T17:59:28Z","updated_at":"2016-08-16T18:37:11Z","closed_at":null,"body":"Great tool by the way!   It has enabled me to write better code by pointing places where things can be dry'd up.\r\n\r\nIt would be nice to disable output for certain places in code where I know there is duplication, but I've chosen to keep the duplication in place.   Sometimes there are reasons for this.   \r\n\r\nI'm thinking something akin to a linting comment to disable duplication checking:\r\n\r\n```\r\n// dupl-disable\r\n\t\t\tContext(\"when specifying parameter set 1\", func() {\r\n\t\t\t\tBeforeEach(func() {\r\n\t\t\t\t\trequest, _ = http.NewRequest(\"GET\", \"/?paramA=20&paramB=40\", nil)\r\n\t\t\t\t})\r\n\t\t\t\tIt(\"should reflect the desired parameters\", func() {\r\n\t\t\t\t\tserver.GET(\"/\", func(c *gin.Context) {\r\n\t\t\t\t\t\tparamSet1, _ := getParamSet1(c)\r\n\t\t\t\t\t\tExpect(paramSet1.A).To(Equal(20))\r\n\t\t\t\t\t\tExpect(paramSet1.B).To(Equal(40))\r\n\t\t\t\t\t})\r\n\t\t\t\t\tserver.ServeHTTP(recorder, request)\r\n\t\t\t\t})\r\n\t\t\t})\r\n// dupl-enable\r\n```\r\n\r\n...\r\n\r\n```\r\n// dupl-disable\r\n\t\t\t\tContext(\"when specifying parameter set 2\", func() {\r\n\t\t\t\t\tBeforeEach(func() {\r\n\t\t\t\t\t\trequest, _ = http.NewRequest(\"GET\", \"/?paramX=5000&paramY=10000\", nil)\r\n\t\t\t\t\t})\r\n\t\t\t\t\tIt(\"will reflect the desired parameters\", func() {\r\n\t\t\t\t\t\tserver.GET(\"/\", func(c *gin.Context) {\r\n\t\t\t\t\t\t\tparamSet2, _ := getParamSet2(c)\r\n\t\t\t\t\t\t\tExpect(paramSet2.X).To(Equal(5000))\r\n\t\t\t\t\t\t\tExpect(paramSet2.Y).To(Equal(10000))\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\tserver.ServeHTTP(recorder, request)\r\n\t\t\t\t\t})\r\n\t\t\t\t})\r\n// dupl-enable\r\n```"},"comment":{"url":"https://api.github.com/repos/mibk/dupl/issues/comments/240196407","html_url":"https://github.com/mibk/dupl/issues/13#issuecomment-240196407","issue_url":"https://api.github.com/repos/mibk/dupl/issues/13","id":240196407,"user":{"login":"shurcooL","id":1924134,"avatar_url":"https://avatars.githubusercontent.com/u/1924134?v=3","gravatar_id":"","url":"https://api.github.com/users/shurcooL","html_url":"https://github.com/shurcooL","followers_url":"https://api.github.com/users/shurcooL/followers","following_url":"https://api.github.com/users/shurcooL/following{/other_user}","gists_url":"https://api.github.com/users/shurcooL/gists{/gist_id}","starred_url":"https://api.github.com/users/shurcooL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shurcooL/subscriptions","organizations_url":"https://api.github.com/users/shurcooL/orgs","repos_url":"https://api.github.com/users/shurcooL/repos","events_url":"https://api.github.com/users/shurcooL/events{/privacy}","received_events_url":"https://api.github.com/users/shurcooL/received_events","type":"User","site_admin":false},"created_at":"2016-08-16T18:37:10Z","updated_at":"2016-08-16T18:37:10Z","body":"A possible solution is to not run `dupl` in CI systems.\r\n\r\n`dupl` is a tool for finding code clones. Such a tool is best used in the hands of a programmer who can tell if a code clone should be acted on, or if everything's normal.\r\n\r\nIt's not a tool for finding errors or issues."}}
{"actor":{"display_login":"shurcooL"}}