{"action":"created","comment":{"url":"https://api.github.com/repos/troessner/reek/pulls/comments/79299180","id":79299180,"diff_hunk":"@@ -0,0 +1,39 @@\n+# frozen_string_literal: true\n+\n+module Reek\n+  module Smells\n+    #\n+    # An unneeded suppression is a Reek's comment disabling a unexistent smell.\n+    #\n+    # See {file:docs/Unneeded-Suppression.md} for details.\n+    class UnneededSuppression\n+      def initialize(context, smell_detector)\n+        @context = context\n+        @smell_detector = smell_detector\n+      end\n+\n+      def sniff\n+        if @smell_detector.sniff(@context).empty?\n+          exp = @context.exp\n+          ctx_source = exp.loc.expression.source_buffer.name\n+          [SmellWarning.new(self,","path":"lib/reek/smells/unneeded_suppression.rb","position":19,"original_position":19,"commit_id":"28a1b5dd28ce40b20f8074846dba2f2498295c31","original_commit_id":"28a1b5dd28ce40b20f8074846dba2f2498295c31","user":{"login":"troessner","id":271109,"avatar_url":"https://avatars.githubusercontent.com/u/271109?v=3","gravatar_id":"","url":"https://api.github.com/users/troessner","html_url":"https://github.com/troessner","followers_url":"https://api.github.com/users/troessner/followers","following_url":"https://api.github.com/users/troessner/following{/other_user}","gists_url":"https://api.github.com/users/troessner/gists{/gist_id}","starred_url":"https://api.github.com/users/troessner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/troessner/subscriptions","organizations_url":"https://api.github.com/users/troessner/orgs","repos_url":"https://api.github.com/users/troessner/repos","events_url":"https://api.github.com/users/troessner/events{/privacy}","received_events_url":"https://api.github.com/users/troessner/received_events","type":"User","site_admin":false},"body":"I see. But then maybe the overall architecture is not the right one.\r\nI mean, we **need** stuff that is in SmellDetector (otherwise we're just duplicating code 1:1 like we do here) but at the same time we try really hard to **not** make this a smell detector.\r\nThat doesn't seem right.\r\nHow about not making this a detector-style thingie but instead follow the same approach you, @mvz, suggested in #1082 at the end?\r\nSo:\r\n\r\n>> I have in mind to handle it at the Examiner level. So here we would first catch Reek::BadConfigurationError, and then StandardError.\r\n\r\nwdyt?","created_at":"2016-09-18T07:06:34Z","updated_at":"2016-09-18T07:06:34Z","html_url":"https://github.com/troessner/reek/pull/1060#discussion_r79299180","pull_request_url":"https://api.github.com/repos/troessner/reek/pulls/1060","_links":{"self":{"href":"https://api.github.com/repos/troessner/reek/pulls/comments/79299180"},"html":{"href":"https://github.com/troessner/reek/pull/1060#discussion_r79299180"},"pull_request":{"href":"https://api.github.com/repos/troessner/reek/pulls/1060"}}},"pull_request":{"url":"https://api.github.com/repos/troessner/reek/pulls/1060","id":84415978,"html_url":"https://github.com/troessner/reek/pull/1060","diff_url":"https://github.com/troessner/reek/pull/1060.diff","patch_url":"https://github.com/troessner/reek/pull/1060.patch","issue_url":"https://api.github.com/repos/troessner/reek/issues/1060","number":1060,"state":"open","locked":false,"title":"Unneeded suppression detector","user":{"login":"waldyr","id":1893997,"avatar_url":"https://avatars.githubusercontent.com/u/1893997?v=3","gravatar_id":"","url":"https://api.github.com/users/waldyr","html_url":"https://github.com/waldyr","followers_url":"https://api.github.com/users/waldyr/followers","following_url":"https://api.github.com/users/waldyr/following{/other_user}","gists_url":"https://api.github.com/users/waldyr/gists{/gist_id}","starred_url":"https://api.github.com/users/waldyr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waldyr/subscriptions","organizations_url":"https://api.github.com/users/waldyr/orgs","repos_url":"https://api.github.com/users/waldyr/repos","events_url":"https://api.github.com/users/waldyr/events{/privacy}","received_events_url":"https://api.github.com/users/waldyr/received_events","type":"User","site_admin":false},"body":"#961 ","created_at":"2016-09-08T05:16:23Z","updated_at":"2016-09-18T07:06:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"423b59dd833e42fe55b3a2256823643d7f43f82f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/troessner/reek/pulls/1060/commits","review_comments_url":"https://api.github.com/repos/troessner/reek/pulls/1060/comments","review_comment_url":"https://api.github.com/repos/troessner/reek/pulls/comments{/number}","comments_url":"https://api.github.com/repos/troessner/reek/issues/1060/comments","statuses_url":"https://api.github.com/repos/troessner/reek/statuses/28a1b5dd28ce40b20f8074846dba2f2498295c31","head":{"label":"troessner:feature/unneeded-suppression-detector","ref":"feature/unneeded-suppression-detector","sha":"28a1b5dd28ce40b20f8074846dba2f2498295c31","user":{"login":"troessner","id":271109,"avatar_url":"https://avatars.githubusercontent.com/u/271109?v=3","gravatar_id":"","url":"https://api.github.com/users/troessner","html_url":"https://github.com/troessner","followers_url":"https://api.github.com/users/troessner/followers","following_url":"https://api.github.com/users/troessner/following{/other_user}","gists_url":"https://api.github.com/users/troessner/gists{/gist_id}","starred_url":"https://api.github.com/users/troessner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/troessner/subscriptions","organizations_url":"https://api.github.com/users/troessner/orgs","repos_url":"https://api.github.com/users/troessner/repos","events_url":"https://api.github.com/users/troessner/events{/privacy}","received_events_url":"https://api.github.com/users/troessner/received_events","type":"User","site_admin":false},"repo":{"id":49515,"name":"reek","full_name":"troessner/reek","owner":{"login":"troessner","id":271109,"avatar_url":"https://avatars.githubusercontent.com/u/271109?v=3","gravatar_id":"","url":"https://api.github.com/users/troessner","html_url":"https://github.com/troessner","followers_url":"https://api.github.com/users/troessner/followers","following_url":"https://api.github.com/users/troessner/following{/other_user}","gists_url":"https://api.github.com/users/troessner/gists{/gist_id}","starred_url":"https://api.github.com/users/troessner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/troessner/subscriptions","organizations_url":"https://api.github.com/users/troessner/orgs","repos_url":"https://api.github.com/users/troessner/repos","events_url":"https://api.github.com/users/troessner/events{/privacy}","received_events_url":"https://api.github.com/users/troessner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/troessner/reek","description":"Code smell detector for Ruby","fork":false,"url":"https://api.github.com/repos/troessner/reek","forks_url":"https://api.github.com/repos/troessner/reek/forks","keys_url":"https://api.github.com/repos/troessner/reek/keys{/key_id}","collaborators_url":"https://api.github.com/repos/troessner/reek/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/troessner/reek/teams","hooks_url":"https://api.github.com/repos/troessner/reek/hooks","issue_events_url":"https://api.github.com/repos/troessner/reek/issues/events{/number}","events_url":"https://api.github.com/repos/troessner/reek/events","assignees_url":"https://api.github.com/repos/troessner/reek/assignees{/user}","branches_url":"https://api.github.com/repos/troessner/reek/branches{/branch}","tags_url":"https://api.github.com/repos/troessner/reek/tags","blobs_url":"https://api.github.com/repos/troessner/reek/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/troessner/reek/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/troessner/reek/git/refs{/sha}","trees_url":"https://api.github.com/repos/troessner/reek/git/trees{/sha}","statuses_url":"https://api.github.com/repos/troessner/reek/statuses/{sha}","languages_url":"https://api.github.com/repos/troessner/reek/languages","stargazers_url":"https://api.github.com/repos/troessner/reek/stargazers","contributors_url":"https://api.github.com/repos/troessner/reek/contributors","subscribers_url":"https://api.github.com/repos/troessner/reek/subscribers","subscription_url":"https://api.github.com/repos/troessner/reek/subscription","commits_url":"https://api.github.com/repos/troessner/reek/commits{/sha}","git_commits_url":"https://api.github.com/repos/troessner/reek/git/commits{/sha}","comments_url":"https://api.github.com/repos/troessner/reek/comments{/number}","issue_comment_url":"https://api.github.com/repos/troessner/reek/issues/comments{/number}","contents_url":"https://api.github.com/repos/troessner/reek/contents/{+path}","compare_url":"https://api.github.com/repos/troessner/reek/compare/{base}...{head}","merges_url":"https://api.github.com/repos/troessner/reek/merges","archive_url":"https://api.github.com/repos/troessner/reek/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/troessner/reek/downloads","issues_url":"https://api.github.com/repos/troessner/reek/issues{/number}","pulls_url":"https://api.github.com/repos/troessner/reek/pulls{/number}","milestones_url":"https://api.github.com/repos/troessner/reek/milestones{/number}","notifications_url":"https://api.github.com/repos/troessner/reek/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/troessner/reek/labels{/name}","releases_url":"https://api.github.com/repos/troessner/reek/releases{/id}","deployments_url":"https://api.github.com/repos/troessner/reek/deployments","created_at":"2008-09-05T10:48:33Z","updated_at":"2016-09-17T18:44:34Z","pushed_at":"2016-09-18T07:02:23Z","git_url":"git://github.com/troessner/reek.git","ssh_url":"git@github.com:troessner/reek.git","clone_url":"https://github.com/troessner/reek.git","svn_url":"https://github.com/troessner/reek","homepage":"https://github.com/troessner/reek/wiki","size":5480,"stargazers_count":2108,"watchers_count":2108,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":139,"mirror_url":null,"open_issues_count":49,"forks":139,"open_issues":49,"watchers":2108,"default_branch":"master"}},"base":{"label":"troessner:master","ref":"master","sha":"417b01f2fa71d1e1dd83ad2fd05cddcf484425af","user":{"login":"troessner","id":271109,"avatar_url":"https://avatars.githubusercontent.com/u/271109?v=3","gravatar_id":"","url":"https://api.github.com/users/troessner","html_url":"https://github.com/troessner","followers_url":"https://api.github.com/users/troessner/followers","following_url":"https://api.github.com/users/troessner/following{/other_user}","gists_url":"https://api.github.com/users/troessner/gists{/gist_id}","starred_url":"https://api.github.com/users/troessner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/troessner/subscriptions","organizations_url":"https://api.github.com/users/troessner/orgs","repos_url":"https://api.github.com/users/troessner/repos","events_url":"https://api.github.com/users/troessner/events{/privacy}","received_events_url":"https://api.github.com/users/troessner/received_events","type":"User","site_admin":false},"repo":{"id":49515,"name":"reek","full_name":"troessner/reek","owner":{"login":"troessner","id":271109,"avatar_url":"https://avatars.githubusercontent.com/u/271109?v=3","gravatar_id":"","url":"https://api.github.com/users/troessner","html_url":"https://github.com/troessner","followers_url":"https://api.github.com/users/troessner/followers","following_url":"https://api.github.com/users/troessner/following{/other_user}","gists_url":"https://api.github.com/users/troessner/gists{/gist_id}","starred_url":"https://api.github.com/users/troessner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/troessner/subscriptions","organizations_url":"https://api.github.com/users/troessner/orgs","repos_url":"https://api.github.com/users/troessner/repos","events_url":"https://api.github.com/users/troessner/events{/privacy}","received_events_url":"https://api.github.com/users/troessner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/troessner/reek","description":"Code smell detector for Ruby","fork":false,"url":"https://api.github.com/repos/troessner/reek","forks_url":"https://api.github.com/repos/troessner/reek/forks","keys_url":"https://api.github.com/repos/troessner/reek/keys{/key_id}","collaborators_url":"https://api.github.com/repos/troessner/reek/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/troessner/reek/teams","hooks_url":"https://api.github.com/repos/troessner/reek/hooks","issue_events_url":"https://api.github.com/repos/troessner/reek/issues/events{/number}","events_url":"https://api.github.com/repos/troessner/reek/events","assignees_url":"https://api.github.com/repos/troessner/reek/assignees{/user}","branches_url":"https://api.github.com/repos/troessner/reek/branches{/branch}","tags_url":"https://api.github.com/repos/troessner/reek/tags","blobs_url":"https://api.github.com/repos/troessner/reek/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/troessner/reek/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/troessner/reek/git/refs{/sha}","trees_url":"https://api.github.com/repos/troessner/reek/git/trees{/sha}","statuses_url":"https://api.github.com/repos/troessner/reek/statuses/{sha}","languages_url":"https://api.github.com/repos/troessner/reek/languages","stargazers_url":"https://api.github.com/repos/troessner/reek/stargazers","contributors_url":"https://api.github.com/repos/troessner/reek/contributors","subscribers_url":"https://api.github.com/repos/troessner/reek/subscribers","subscription_url":"https://api.github.com/repos/troessner/reek/subscription","commits_url":"https://api.github.com/repos/troessner/reek/commits{/sha}","git_commits_url":"https://api.github.com/repos/troessner/reek/git/commits{/sha}","comments_url":"https://api.github.com/repos/troessner/reek/comments{/number}","issue_comment_url":"https://api.github.com/repos/troessner/reek/issues/comments{/number}","contents_url":"https://api.github.com/repos/troessner/reek/contents/{+path}","compare_url":"https://api.github.com/repos/troessner/reek/compare/{base}...{head}","merges_url":"https://api.github.com/repos/troessner/reek/merges","archive_url":"https://api.github.com/repos/troessner/reek/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/troessner/reek/downloads","issues_url":"https://api.github.com/repos/troessner/reek/issues{/number}","pulls_url":"https://api.github.com/repos/troessner/reek/pulls{/number}","milestones_url":"https://api.github.com/repos/troessner/reek/milestones{/number}","notifications_url":"https://api.github.com/repos/troessner/reek/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/troessner/reek/labels{/name}","releases_url":"https://api.github.com/repos/troessner/reek/releases{/id}","deployments_url":"https://api.github.com/repos/troessner/reek/deployments","created_at":"2008-09-05T10:48:33Z","updated_at":"2016-09-17T18:44:34Z","pushed_at":"2016-09-18T07:02:23Z","git_url":"git://github.com/troessner/reek.git","ssh_url":"git@github.com:troessner/reek.git","clone_url":"https://github.com/troessner/reek.git","svn_url":"https://github.com/troessner/reek","homepage":"https://github.com/troessner/reek/wiki","size":5480,"stargazers_count":2108,"watchers_count":2108,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":139,"mirror_url":null,"open_issues_count":49,"forks":139,"open_issues":49,"watchers":2108,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/troessner/reek/pulls/1060"},"html":{"href":"https://github.com/troessner/reek/pull/1060"},"issue":{"href":"https://api.github.com/repos/troessner/reek/issues/1060"},"comments":{"href":"https://api.github.com/repos/troessner/reek/issues/1060/comments"},"review_comments":{"href":"https://api.github.com/repos/troessner/reek/pulls/1060/comments"},"review_comment":{"href":"https://api.github.com/repos/troessner/reek/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/troessner/reek/pulls/1060/commits"},"statuses":{"href":"https://api.github.com/repos/troessner/reek/statuses/28a1b5dd28ce40b20f8074846dba2f2498295c31"}}}}
{"actor":{"display_login":"troessner"}}