{"action":"created","comment":{"url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/pulls/comments/178331863","pull_request_review_id":108381782,"id":178331863,"diff_hunk":"@@ -0,0 +1,54 @@\n+This PR allows users to suppress modernizer errors by adding `@SuppressWarnings(\"modernizer\")` at class/method level.\n+\n+How can a user suppress modernizer warnings?\n+\n+`modernizer-annotation-processor` should be added as a dependency in the project.\n+Any class/method can be annotated with `@SuppressWarnings(\"modernizer\")` to suppress all modernizer errors\n+in that block of code.\n+\n+Implementation strategy\n+\n+1. Code base has been organized into 3 modules.\n+   `modernizer-maven-plugin` module has the main plugin code.\n+   `modernizer-maven-policy` module has checkstyle rules and is added as a dependency to `maven-checkstyle-plugin`\n+   in plugin module's pom.\n+   `modernizer-annotation-processor` module has annotation processing code and is added as a dependency in plugin module.\n+3. When a project is run, before compiling the source code in the project, annotation processor\n+   scans to see if there are any methods/classes annotated as `@SuppressWarnings(\"modernizer\")`. It can be found in two places\n+   1. If the annotation is on a class, the processor constructs a fully qualified class name of the class and adds\n+   `(\\$.+)?` at the end. This is the regex format.\n+   For every annotated class, these regex strings are constructed and added to a list.\n+   For example: \"org/gaul/package/ClassOne\\$ClassTwo(\\$.+)?\"\n+   2. If the annotation is on a method, the processor constructs a string with 3 parts, delimited by spaces - fully\n+   qualified class name, method name, list of formal parameters. These are normalized to be compared to the format\n+   expected by ASM. For every annotated method, these strings are constructed and added to a list.\n+   For example: \"org/gaul/package/ClassOne methodOne int[] java.util.List\"\n+4. Strings in the lists mentioned above, are dumped into 2 different files - `ignore-annotated-classes.txt` and\n+   `ignore-annotated-methods.txt`. These files are created in the `/target/modernizer/test` and/or `/target/modernizer/main`\n+   directory of the processing environment.\n+5. When the plugin run, in the Mojo, these files are read from the output directory (if they exist).\n+   If the `ignore-classes` file exists, it is read and the strings are added to `allIgnoreFullClassNamePatterns`.","path":"UPSTREAM-README.md","position":30,"original_position":30,"commit_id":"0fcccd24b7f79a07fd6158a0079ed4fff7119bf8","original_commit_id":"0fcccd24b7f79a07fd6158a0079ed4fff7119bf8","user":{"login":"stevegutz","id":3606665,"avatar_url":"https://avatars1.githubusercontent.com/u/3606665?v=4","gravatar_id":"","url":"https://api.github.com/users/stevegutz","html_url":"https://github.com/stevegutz","followers_url":"https://api.github.com/users/stevegutz/followers","following_url":"https://api.github.com/users/stevegutz/following{/other_user}","gists_url":"https://api.github.com/users/stevegutz/gists{/gist_id}","starred_url":"https://api.github.com/users/stevegutz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevegutz/subscriptions","organizations_url":"https://api.github.com/users/stevegutz/orgs","repos_url":"https://api.github.com/users/stevegutz/repos","events_url":"https://api.github.com/users/stevegutz/events{/privacy}","received_events_url":"https://api.github.com/users/stevegutz/received_events","type":"User","site_admin":false},"body":"I don't think these lines are necessary. This can be inferred from the code","created_at":"2018-03-30T17:21:03Z","updated_at":"2018-03-30T17:21:04Z","html_url":"https://github.com/HubSpot/modernizer-maven-plugin/pull/9#discussion_r178331863","pull_request_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/pulls/9","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/pulls/comments/178331863"},"html":{"href":"https://github.com/HubSpot/modernizer-maven-plugin/pull/9#discussion_r178331863"},"pull_request":{"href":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/pulls/9","id":178582909,"html_url":"https://github.com/HubSpot/modernizer-maven-plugin/pull/9","diff_url":"https://github.com/HubSpot/modernizer-maven-plugin/pull/9.diff","patch_url":"https://github.com/HubSpot/modernizer-maven-plugin/pull/9.patch","issue_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/issues/9","number":9,"state":"open","locked":false,"title":"Drafting PR message","user":{"login":"Nimisha94","id":13430900,"avatar_url":"https://avatars2.githubusercontent.com/u/13430900?v=4","gravatar_id":"","url":"https://api.github.com/users/Nimisha94","html_url":"https://github.com/Nimisha94","followers_url":"https://api.github.com/users/Nimisha94/followers","following_url":"https://api.github.com/users/Nimisha94/following{/other_user}","gists_url":"https://api.github.com/users/Nimisha94/gists{/gist_id}","starred_url":"https://api.github.com/users/Nimisha94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nimisha94/subscriptions","organizations_url":"https://api.github.com/users/Nimisha94/orgs","repos_url":"https://api.github.com/users/Nimisha94/repos","events_url":"https://api.github.com/users/Nimisha94/events{/privacy}","received_events_url":"https://api.github.com/users/Nimisha94/received_events","type":"User","site_admin":false},"body":"This PR adds a file which has the PR message to be included when upstreaming the changes.\r\n\r\n@stevegutz @jhaber @kmclarnon ","created_at":"2018-03-30T15:38:43Z","updated_at":"2018-03-30T17:21:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8d4bbf72869ad9db673fafaeea40e09e6d8750f3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/pulls/9/commits","review_comments_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/pulls/9/comments","review_comment_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/issues/9/comments","statuses_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/statuses/0fcccd24b7f79a07fd6158a0079ed4fff7119bf8","head":{"label":"HubSpot:draft-PR-message","ref":"draft-PR-message","sha":"0fcccd24b7f79a07fd6158a0079ed4fff7119bf8","user":{"login":"HubSpot","id":326419,"avatar_url":"https://avatars2.githubusercontent.com/u/326419?v=4","gravatar_id":"","url":"https://api.github.com/users/HubSpot","html_url":"https://github.com/HubSpot","followers_url":"https://api.github.com/users/HubSpot/followers","following_url":"https://api.github.com/users/HubSpot/following{/other_user}","gists_url":"https://api.github.com/users/HubSpot/gists{/gist_id}","starred_url":"https://api.github.com/users/HubSpot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HubSpot/subscriptions","organizations_url":"https://api.github.com/users/HubSpot/orgs","repos_url":"https://api.github.com/users/HubSpot/repos","events_url":"https://api.github.com/users/HubSpot/events{/privacy}","received_events_url":"https://api.github.com/users/HubSpot/received_events","type":"Organization","site_admin":false},"repo":{"id":122232877,"name":"modernizer-maven-plugin","full_name":"HubSpot/modernizer-maven-plugin","owner":{"login":"HubSpot","id":326419,"avatar_url":"https://avatars2.githubusercontent.com/u/326419?v=4","gravatar_id":"","url":"https://api.github.com/users/HubSpot","html_url":"https://github.com/HubSpot","followers_url":"https://api.github.com/users/HubSpot/followers","following_url":"https://api.github.com/users/HubSpot/following{/other_user}","gists_url":"https://api.github.com/users/HubSpot/gists{/gist_id}","starred_url":"https://api.github.com/users/HubSpot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HubSpot/subscriptions","organizations_url":"https://api.github.com/users/HubSpot/orgs","repos_url":"https://api.github.com/users/HubSpot/repos","events_url":"https://api.github.com/users/HubSpot/events{/privacy}","received_events_url":"https://api.github.com/users/HubSpot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HubSpot/modernizer-maven-plugin","description":"Detect uses of legacy Java APIs","fork":true,"url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin","forks_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/forks","keys_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/teams","hooks_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/hooks","issue_events_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/events","assignees_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/tags","blobs_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/languages","stargazers_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/stargazers","contributors_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/contributors","subscribers_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/subscribers","subscription_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/subscription","commits_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/merges","archive_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/downloads","issues_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/labels{/name}","releases_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/deployments","created_at":"2018-02-20T17:43:24Z","updated_at":"2018-03-29T19:34:28Z","pushed_at":"2018-03-30T15:38:44Z","git_url":"git://github.com/HubSpot/modernizer-maven-plugin.git","ssh_url":"git@github.com:HubSpot/modernizer-maven-plugin.git","clone_url":"https://github.com/HubSpot/modernizer-maven-plugin.git","svn_url":"https://github.com/HubSpot/modernizer-maven-plugin","homepage":"","size":220,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"hubspot"}},"base":{"label":"HubSpot:hubspot","ref":"hubspot","sha":"ed045dd941939c7e7620ed89c75ac30a84b6df26","user":{"login":"HubSpot","id":326419,"avatar_url":"https://avatars2.githubusercontent.com/u/326419?v=4","gravatar_id":"","url":"https://api.github.com/users/HubSpot","html_url":"https://github.com/HubSpot","followers_url":"https://api.github.com/users/HubSpot/followers","following_url":"https://api.github.com/users/HubSpot/following{/other_user}","gists_url":"https://api.github.com/users/HubSpot/gists{/gist_id}","starred_url":"https://api.github.com/users/HubSpot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HubSpot/subscriptions","organizations_url":"https://api.github.com/users/HubSpot/orgs","repos_url":"https://api.github.com/users/HubSpot/repos","events_url":"https://api.github.com/users/HubSpot/events{/privacy}","received_events_url":"https://api.github.com/users/HubSpot/received_events","type":"Organization","site_admin":false},"repo":{"id":122232877,"name":"modernizer-maven-plugin","full_name":"HubSpot/modernizer-maven-plugin","owner":{"login":"HubSpot","id":326419,"avatar_url":"https://avatars2.githubusercontent.com/u/326419?v=4","gravatar_id":"","url":"https://api.github.com/users/HubSpot","html_url":"https://github.com/HubSpot","followers_url":"https://api.github.com/users/HubSpot/followers","following_url":"https://api.github.com/users/HubSpot/following{/other_user}","gists_url":"https://api.github.com/users/HubSpot/gists{/gist_id}","starred_url":"https://api.github.com/users/HubSpot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HubSpot/subscriptions","organizations_url":"https://api.github.com/users/HubSpot/orgs","repos_url":"https://api.github.com/users/HubSpot/repos","events_url":"https://api.github.com/users/HubSpot/events{/privacy}","received_events_url":"https://api.github.com/users/HubSpot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HubSpot/modernizer-maven-plugin","description":"Detect uses of legacy Java APIs","fork":true,"url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin","forks_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/forks","keys_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/teams","hooks_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/hooks","issue_events_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/events","assignees_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/tags","blobs_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/languages","stargazers_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/stargazers","contributors_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/contributors","subscribers_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/subscribers","subscription_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/subscription","commits_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/merges","archive_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/downloads","issues_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/labels{/name}","releases_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/deployments","created_at":"2018-02-20T17:43:24Z","updated_at":"2018-03-29T19:34:28Z","pushed_at":"2018-03-30T15:38:44Z","git_url":"git://github.com/HubSpot/modernizer-maven-plugin.git","ssh_url":"git@github.com:HubSpot/modernizer-maven-plugin.git","clone_url":"https://github.com/HubSpot/modernizer-maven-plugin.git","svn_url":"https://github.com/HubSpot/modernizer-maven-plugin","homepage":"","size":220,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"hubspot"}},"_links":{"self":{"href":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/pulls/9"},"html":{"href":"https://github.com/HubSpot/modernizer-maven-plugin/pull/9"},"issue":{"href":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/issues/9"},"comments":{"href":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/HubSpot/modernizer-maven-plugin/statuses/0fcccd24b7f79a07fd6158a0079ed4fff7119bf8"}},"author_association":"NONE"}}
{"actor":{"display_login":"stevegutz"}}