{"action":"created","comment":{"url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/pulls/comments/46820778","id":46820778,"diff_hunk":"@@ -10,56 +10,110 @@ import sbt._\n \n /**\n   * An SBT plugin to run checkstyle over Java code\n-  *  \n+  *\n   * @author Andrew Johnson <ajohnson@etsy.com>\n+  * @author Alejandro Rivera <alejandro.rivera.lopez@gmail.com>\n+  * @author Joseph Earl <joe@josephearl.co.uk>\n   */\n object Checkstyle extends Plugin {\n+\n   import com.etsy.sbt.Checkstyle.CheckstyleTasks._\n \n   object CheckstyleTasks {\n     val checkstyle = TaskKey[Unit](\"checkstyle\", \"Runs checkstyle\")\n+    val checkstyleCheck = TaskKey[Unit](\"checkstyle-check\", \"Runs checkstyle and fails the task if issues are found\")\n     val checkstyleTarget = SettingKey[File](\"checkstyle-target\", \"The location of the generated checkstyle report\")\n     val checkstyleConfig = SettingKey[File](\"checkstyle-config\", \"The location of the checkstyle configuration file\")\n     val xsltTransformations = SettingKey[Option[Set[XSLTSettings]]](\"xslt-transformations\", \"An optional set of XSLT transformations to be applied to the checkstyle output\")\n+    val checkstyleCheckSeverityLevel = SettingKey[String](\"checkstyle-check-level\", \"Sets the severity levels which should fail the build\")","path":"src/main/scala/com/etsy/sbt/Checkstyle.scala","position":20,"original_position":20,"commit_id":"77ee297e98202b86af1e6c5262a83d9e3e91ece5","original_commit_id":"77ee297e98202b86af1e6c5262a83d9e3e91ece5","user":{"login":"ajsquared","id":58685,"avatar_url":"https://avatars.githubusercontent.com/u/58685?v=3","gravatar_id":"","url":"https://api.github.com/users/ajsquared","html_url":"https://github.com/ajsquared","followers_url":"https://api.github.com/users/ajsquared/followers","following_url":"https://api.github.com/users/ajsquared/following{/other_user}","gists_url":"https://api.github.com/users/ajsquared/gists{/gist_id}","starred_url":"https://api.github.com/users/ajsquared/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajsquared/subscriptions","organizations_url":"https://api.github.com/users/ajsquared/orgs","repos_url":"https://api.github.com/users/ajsquared/repos","events_url":"https://api.github.com/users/ajsquared/events{/privacy}","received_events_url":"https://api.github.com/users/ajsquared/received_events","type":"User","site_admin":false},"body":"What are your thoughts on defining an enum/case objects to enumerate the possible set of valid values here instead of using a string?","created_at":"2015-12-07T13:38:55Z","updated_at":"2015-12-07T13:38:55Z","html_url":"https://github.com/etsy/sbt-checkstyle-plugin/pull/10#discussion_r46820778","pull_request_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/pulls/comments/46820778"},"html":{"href":"https://github.com/etsy/sbt-checkstyle-plugin/pull/10#discussion_r46820778"},"pull_request":{"href":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/pulls/10","id":52715175,"html_url":"https://github.com/etsy/sbt-checkstyle-plugin/pull/10","diff_url":"https://github.com/etsy/sbt-checkstyle-plugin/pull/10.diff","patch_url":"https://github.com/etsy/sbt-checkstyle-plugin/pull/10.patch","issue_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/issues/10","number":10,"state":"open","locked":false,"title":"Use checkstyle-check to fail build on warnings or errors","user":{"login":"JosephEarl","id":2513147,"avatar_url":"https://avatars.githubusercontent.com/u/2513147?v=3","gravatar_id":"","url":"https://api.github.com/users/JosephEarl","html_url":"https://github.com/JosephEarl","followers_url":"https://api.github.com/users/JosephEarl/followers","following_url":"https://api.github.com/users/JosephEarl/following{/other_user}","gists_url":"https://api.github.com/users/JosephEarl/gists{/gist_id}","starred_url":"https://api.github.com/users/JosephEarl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JosephEarl/subscriptions","organizations_url":"https://api.github.com/users/JosephEarl/orgs","repos_url":"https://api.github.com/users/JosephEarl/repos","events_url":"https://api.github.com/users/JosephEarl/events{/privacy}","received_events_url":"https://api.github.com/users/JosephEarl/received_events","type":"User","site_admin":false},"body":"Fixed #8. Ported from https://github.com/Redmart/sbt-checkstyle-plugin, refactored to avoid duplicate code.\r\n\r\nAdds checkstyle-check task and checkstyleCheckSeverityLevel setting.","created_at":"2015-12-04T20:09:05Z","updated_at":"2015-12-07T13:38:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2eeb459385aa28af8866270977f6daabbad8ec87","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/pulls/10/commits","review_comments_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/pulls/10/comments","review_comment_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/issues/10/comments","statuses_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/statuses/77ee297e98202b86af1e6c5262a83d9e3e91ece5","head":{"label":"JosephEarl:checkstyle-check","ref":"checkstyle-check","sha":"77ee297e98202b86af1e6c5262a83d9e3e91ece5","user":{"login":"JosephEarl","id":2513147,"avatar_url":"https://avatars.githubusercontent.com/u/2513147?v=3","gravatar_id":"","url":"https://api.github.com/users/JosephEarl","html_url":"https://github.com/JosephEarl","followers_url":"https://api.github.com/users/JosephEarl/followers","following_url":"https://api.github.com/users/JosephEarl/following{/other_user}","gists_url":"https://api.github.com/users/JosephEarl/gists{/gist_id}","starred_url":"https://api.github.com/users/JosephEarl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JosephEarl/subscriptions","organizations_url":"https://api.github.com/users/JosephEarl/orgs","repos_url":"https://api.github.com/users/JosephEarl/repos","events_url":"https://api.github.com/users/JosephEarl/events{/privacy}","received_events_url":"https://api.github.com/users/JosephEarl/received_events","type":"User","site_admin":false},"repo":{"id":47136432,"name":"sbt-checkstyle-plugin","full_name":"JosephEarl/sbt-checkstyle-plugin","owner":{"login":"JosephEarl","id":2513147,"avatar_url":"https://avatars.githubusercontent.com/u/2513147?v=3","gravatar_id":"","url":"https://api.github.com/users/JosephEarl","html_url":"https://github.com/JosephEarl","followers_url":"https://api.github.com/users/JosephEarl/followers","following_url":"https://api.github.com/users/JosephEarl/following{/other_user}","gists_url":"https://api.github.com/users/JosephEarl/gists{/gist_id}","starred_url":"https://api.github.com/users/JosephEarl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JosephEarl/subscriptions","organizations_url":"https://api.github.com/users/JosephEarl/orgs","repos_url":"https://api.github.com/users/JosephEarl/repos","events_url":"https://api.github.com/users/JosephEarl/events{/privacy}","received_events_url":"https://api.github.com/users/JosephEarl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JosephEarl/sbt-checkstyle-plugin","description":"SBT Plugin for Running Checkstyle on Java Sources","fork":true,"url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin","forks_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/forks","keys_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/teams","hooks_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/hooks","issue_events_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/events","assignees_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/tags","blobs_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/languages","stargazers_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/stargazers","contributors_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/contributors","subscribers_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/subscribers","subscription_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/subscription","commits_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/merges","archive_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/downloads","issues_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/labels{/name}","releases_url":"https://api.github.com/repos/JosephEarl/sbt-checkstyle-plugin/releases{/id}","created_at":"2015-11-30T18:03:17Z","updated_at":"2015-11-30T18:03:18Z","pushed_at":"2015-12-05T00:40:54Z","git_url":"git://github.com/JosephEarl/sbt-checkstyle-plugin.git","ssh_url":"git@github.com:JosephEarl/sbt-checkstyle-plugin.git","clone_url":"https://github.com/JosephEarl/sbt-checkstyle-plugin.git","svn_url":"https://github.com/JosephEarl/sbt-checkstyle-plugin","homepage":null,"size":53,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"etsy:master","ref":"master","sha":"de43e46d9966a8d3f3095c400ba39b639ece4d39","user":{"login":"etsy","id":193389,"avatar_url":"https://avatars.githubusercontent.com/u/193389?v=3","gravatar_id":"","url":"https://api.github.com/users/etsy","html_url":"https://github.com/etsy","followers_url":"https://api.github.com/users/etsy/followers","following_url":"https://api.github.com/users/etsy/following{/other_user}","gists_url":"https://api.github.com/users/etsy/gists{/gist_id}","starred_url":"https://api.github.com/users/etsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etsy/subscriptions","organizations_url":"https://api.github.com/users/etsy/orgs","repos_url":"https://api.github.com/users/etsy/repos","events_url":"https://api.github.com/users/etsy/events{/privacy}","received_events_url":"https://api.github.com/users/etsy/received_events","type":"Organization","site_admin":false},"repo":{"id":23709817,"name":"sbt-checkstyle-plugin","full_name":"etsy/sbt-checkstyle-plugin","owner":{"login":"etsy","id":193389,"avatar_url":"https://avatars.githubusercontent.com/u/193389?v=3","gravatar_id":"","url":"https://api.github.com/users/etsy","html_url":"https://github.com/etsy","followers_url":"https://api.github.com/users/etsy/followers","following_url":"https://api.github.com/users/etsy/following{/other_user}","gists_url":"https://api.github.com/users/etsy/gists{/gist_id}","starred_url":"https://api.github.com/users/etsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etsy/subscriptions","organizations_url":"https://api.github.com/users/etsy/orgs","repos_url":"https://api.github.com/users/etsy/repos","events_url":"https://api.github.com/users/etsy/events{/privacy}","received_events_url":"https://api.github.com/users/etsy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/etsy/sbt-checkstyle-plugin","description":"SBT Plugin for Running Checkstyle on Java Sources","fork":false,"url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin","forks_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/forks","keys_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/teams","hooks_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/hooks","issue_events_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/events","assignees_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/tags","blobs_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/languages","stargazers_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/stargazers","contributors_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/contributors","subscribers_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/subscribers","subscription_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/subscription","commits_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/merges","archive_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/downloads","issues_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/labels{/name}","releases_url":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/releases{/id}","created_at":"2014-09-05T16:21:13Z","updated_at":"2015-11-12T09:39:08Z","pushed_at":"2015-12-05T00:42:38Z","git_url":"git://github.com/etsy/sbt-checkstyle-plugin.git","ssh_url":"git@github.com:etsy/sbt-checkstyle-plugin.git","clone_url":"https://github.com/etsy/sbt-checkstyle-plugin.git","svn_url":"https://github.com/etsy/sbt-checkstyle-plugin","homepage":null,"size":48,"stargazers_count":10,"watchers_count":10,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":6,"forks":6,"open_issues":6,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/pulls/10"},"html":{"href":"https://github.com/etsy/sbt-checkstyle-plugin/pull/10"},"issue":{"href":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/issues/10"},"comments":{"href":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/etsy/sbt-checkstyle-plugin/statuses/77ee297e98202b86af1e6c5262a83d9e3e91ece5"}}}}