{"action":"created","comment":{"url":"https://api.github.com/repos/jscs-dev/gulp-jscs/pulls/comments/24299446","id":24299446,"diff_hunk":"@@ -0,0 +1,44 @@\n+'use strict';\n+var getReporter = require('jscs/lib/cli-config').getReporter;\n+var PluginError = require('gulp-util').PluginError;\n+var through = require('through2');\n+\n+exports.failReporter = require('./fail');\n+\n+exports.loadReporter = function (reporter) {\n+\t// we want the function\n+\tif (typeof reporter === 'function') return reporter;\n+\n+\t// object reporters\n+\tif (typeof reporter === 'object' && typeof reporter.reporter === 'function') return reporter.reporter;\n+\n+\t// load JSCS built-in or full-path or module reporters\n+\tif (typeof reporter === 'string' || !reporter) {\n+\t\ttry {\n+\t\t\treturn getReporter(reporter).writer;\n+\t\t} catch (err) {}\n+\t}\n+};\n+\n+exports.reporter = function (reporter, reporterCfg) {\n+\treporterCfg = reporterCfg || {};\n+\n+\tif (reporter === 'fail') {\n+\t\treturn exports.failReporter(reporterCfg);\n+\t}\n+\n+\tvar rpt = exports.loadReporter(reporter);\n+\n+\tif (typeof rpt !== 'function') {\n+\t\tthrow new PluginError('gulp-jscs', 'Invalid reporter');\n+\t}\n+\n+\t// return stream that reports stuff\n+\treturn through.obj(function (file, enc, cb) {\n+\t\tif (file.jscs && !file.jscs.success) {\n+\t\t\trpt([file.jscs.errors]);","path":"reporters/index.js","position":23,"original_position":39,"commit_id":"e28598a001a483c930127b49634f58fc098f2cd7","original_commit_id":"7c92f41f93e9233f90fb9ad2d86cef69923a57ad","user":{"login":"UltCombo","id":2090712,"avatar_url":"https://avatars.githubusercontent.com/u/2090712?v=3","gravatar_id":"","url":"https://api.github.com/users/UltCombo","html_url":"https://github.com/UltCombo","followers_url":"https://api.github.com/users/UltCombo/followers","following_url":"https://api.github.com/users/UltCombo/following{/other_user}","gists_url":"https://api.github.com/users/UltCombo/gists{/gist_id}","starred_url":"https://api.github.com/users/UltCombo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UltCombo/subscriptions","organizations_url":"https://api.github.com/users/UltCombo/orgs","repos_url":"https://api.github.com/users/UltCombo/repos","events_url":"https://api.github.com/users/UltCombo/events{/privacy}","received_events_url":"https://api.github.com/users/UltCombo/received_events","type":"User","site_admin":false},"body":"k","created_at":"2015-02-08T15:51:04Z","updated_at":"2015-02-08T15:51:04Z","html_url":"https://github.com/jscs-dev/gulp-jscs/pull/66#discussion_r24299446","pull_request_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/pulls/66","_links":{"self":{"href":"https://api.github.com/repos/jscs-dev/gulp-jscs/pulls/comments/24299446"},"html":{"href":"https://github.com/jscs-dev/gulp-jscs/pull/66#discussion_r24299446"},"pull_request":{"href":"https://api.github.com/repos/jscs-dev/gulp-jscs/pulls/66"}}},"pull_request":{"url":"https://api.github.com/repos/jscs-dev/gulp-jscs/pulls/66","id":28521169,"html_url":"https://github.com/jscs-dev/gulp-jscs/pull/66","diff_url":"https://github.com/jscs-dev/gulp-jscs/pull/66.diff","patch_url":"https://github.com/jscs-dev/gulp-jscs/pull/66.patch","issue_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/issues/66","number":66,"state":"open","locked":false,"title":"Add gulp-jshint-like reporters, fixes #21","user":{"login":"UltCombo","id":2090712,"avatar_url":"https://avatars.githubusercontent.com/u/2090712?v=3","gravatar_id":"","url":"https://api.github.com/users/UltCombo","html_url":"https://github.com/UltCombo","followers_url":"https://api.github.com/users/UltCombo/followers","following_url":"https://api.github.com/users/UltCombo/following{/other_user}","gists_url":"https://api.github.com/users/UltCombo/gists{/gist_id}","starred_url":"https://api.github.com/users/UltCombo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UltCombo/subscriptions","organizations_url":"https://api.github.com/users/UltCombo/orgs","repos_url":"https://api.github.com/users/UltCombo/repos","events_url":"https://api.github.com/users/UltCombo/events{/privacy}","received_events_url":"https://api.github.com/users/UltCombo/received_events","type":"User","site_admin":false},"body":"This is an early implementation, lacks docs and tests but seems to work for the basic use cases.\r\n\r\nBasic usage:\r\n\r\n```js\r\nvar gulp = require('gulp');\r\nvar jscs = require('gulp-jscs');\r\n\r\ngulp.task('default', function () {\r\n  return gulp.src('fix/*.js')\r\n    .pipe(jscs())\r\n    .pipe(jscs.reporter())\r\n    .pipe(jscs.reporter('fail'))\r\n    ;\r\n});\r\n```\r\n\r\nFixes #21 ","created_at":"2015-02-03T02:10:44Z","updated_at":"2015-02-08T15:51:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"181e0f2eb565112adbdd493580aa82dab489985b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/pulls/66/commits","review_comments_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/pulls/66/comments","review_comment_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/pulls/comments/{number}","comments_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/issues/66/comments","statuses_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/statuses/e28598a001a483c930127b49634f58fc098f2cd7","head":{"label":"UltCombo:reporters","ref":"reporters","sha":"e28598a001a483c930127b49634f58fc098f2cd7","user":{"login":"UltCombo","id":2090712,"avatar_url":"https://avatars.githubusercontent.com/u/2090712?v=3","gravatar_id":"","url":"https://api.github.com/users/UltCombo","html_url":"https://github.com/UltCombo","followers_url":"https://api.github.com/users/UltCombo/followers","following_url":"https://api.github.com/users/UltCombo/following{/other_user}","gists_url":"https://api.github.com/users/UltCombo/gists{/gist_id}","starred_url":"https://api.github.com/users/UltCombo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UltCombo/subscriptions","organizations_url":"https://api.github.com/users/UltCombo/orgs","repos_url":"https://api.github.com/users/UltCombo/repos","events_url":"https://api.github.com/users/UltCombo/events{/privacy}","received_events_url":"https://api.github.com/users/UltCombo/received_events","type":"User","site_admin":false},"repo":{"id":26115599,"name":"gulp-jscs","full_name":"UltCombo/gulp-jscs","owner":{"login":"UltCombo","id":2090712,"avatar_url":"https://avatars.githubusercontent.com/u/2090712?v=3","gravatar_id":"","url":"https://api.github.com/users/UltCombo","html_url":"https://github.com/UltCombo","followers_url":"https://api.github.com/users/UltCombo/followers","following_url":"https://api.github.com/users/UltCombo/following{/other_user}","gists_url":"https://api.github.com/users/UltCombo/gists{/gist_id}","starred_url":"https://api.github.com/users/UltCombo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UltCombo/subscriptions","organizations_url":"https://api.github.com/users/UltCombo/orgs","repos_url":"https://api.github.com/users/UltCombo/repos","events_url":"https://api.github.com/users/UltCombo/events{/privacy}","received_events_url":"https://api.github.com/users/UltCombo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/UltCombo/gulp-jscs","description":"Check JavaScript code style with jscs","fork":true,"url":"https://api.github.com/repos/UltCombo/gulp-jscs","forks_url":"https://api.github.com/repos/UltCombo/gulp-jscs/forks","keys_url":"https://api.github.com/repos/UltCombo/gulp-jscs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UltCombo/gulp-jscs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UltCombo/gulp-jscs/teams","hooks_url":"https://api.github.com/repos/UltCombo/gulp-jscs/hooks","issue_events_url":"https://api.github.com/repos/UltCombo/gulp-jscs/issues/events{/number}","events_url":"https://api.github.com/repos/UltCombo/gulp-jscs/events","assignees_url":"https://api.github.com/repos/UltCombo/gulp-jscs/assignees{/user}","branches_url":"https://api.github.com/repos/UltCombo/gulp-jscs/branches{/branch}","tags_url":"https://api.github.com/repos/UltCombo/gulp-jscs/tags","blobs_url":"https://api.github.com/repos/UltCombo/gulp-jscs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UltCombo/gulp-jscs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UltCombo/gulp-jscs/git/refs{/sha}","trees_url":"https://api.github.com/repos/UltCombo/gulp-jscs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UltCombo/gulp-jscs/statuses/{sha}","languages_url":"https://api.github.com/repos/UltCombo/gulp-jscs/languages","stargazers_url":"https://api.github.com/repos/UltCombo/gulp-jscs/stargazers","contributors_url":"https://api.github.com/repos/UltCombo/gulp-jscs/contributors","subscribers_url":"https://api.github.com/repos/UltCombo/gulp-jscs/subscribers","subscription_url":"https://api.github.com/repos/UltCombo/gulp-jscs/subscription","commits_url":"https://api.github.com/repos/UltCombo/gulp-jscs/commits{/sha}","git_commits_url":"https://api.github.com/repos/UltCombo/gulp-jscs/git/commits{/sha}","comments_url":"https://api.github.com/repos/UltCombo/gulp-jscs/comments{/number}","issue_comment_url":"https://api.github.com/repos/UltCombo/gulp-jscs/issues/comments/{number}","contents_url":"https://api.github.com/repos/UltCombo/gulp-jscs/contents/{+path}","compare_url":"https://api.github.com/repos/UltCombo/gulp-jscs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UltCombo/gulp-jscs/merges","archive_url":"https://api.github.com/repos/UltCombo/gulp-jscs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UltCombo/gulp-jscs/downloads","issues_url":"https://api.github.com/repos/UltCombo/gulp-jscs/issues{/number}","pulls_url":"https://api.github.com/repos/UltCombo/gulp-jscs/pulls{/number}","milestones_url":"https://api.github.com/repos/UltCombo/gulp-jscs/milestones{/number}","notifications_url":"https://api.github.com/repos/UltCombo/gulp-jscs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UltCombo/gulp-jscs/labels{/name}","releases_url":"https://api.github.com/repos/UltCombo/gulp-jscs/releases{/id}","created_at":"2014-11-03T11:26:20Z","updated_at":"2015-02-02T23:21:11Z","pushed_at":"2015-02-08T15:49:03Z","git_url":"git://github.com/UltCombo/gulp-jscs.git","ssh_url":"git@github.com:UltCombo/gulp-jscs.git","clone_url":"https://github.com/UltCombo/gulp-jscs.git","svn_url":"https://github.com/UltCombo/gulp-jscs","homepage":null,"size":269,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"jscs-dev:master","ref":"master","sha":"74b92cfa90a87596b6c38246b313e940458948d1","user":{"login":"jscs-dev","id":8018201,"avatar_url":"https://avatars.githubusercontent.com/u/8018201?v=3","gravatar_id":"","url":"https://api.github.com/users/jscs-dev","html_url":"https://github.com/jscs-dev","followers_url":"https://api.github.com/users/jscs-dev/followers","following_url":"https://api.github.com/users/jscs-dev/following{/other_user}","gists_url":"https://api.github.com/users/jscs-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/jscs-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jscs-dev/subscriptions","organizations_url":"https://api.github.com/users/jscs-dev/orgs","repos_url":"https://api.github.com/users/jscs-dev/repos","events_url":"https://api.github.com/users/jscs-dev/events{/privacy}","received_events_url":"https://api.github.com/users/jscs-dev/received_events","type":"Organization","site_admin":false},"repo":{"id":15463351,"name":"gulp-jscs","full_name":"jscs-dev/gulp-jscs","owner":{"login":"jscs-dev","id":8018201,"avatar_url":"https://avatars.githubusercontent.com/u/8018201?v=3","gravatar_id":"","url":"https://api.github.com/users/jscs-dev","html_url":"https://github.com/jscs-dev","followers_url":"https://api.github.com/users/jscs-dev/followers","following_url":"https://api.github.com/users/jscs-dev/following{/other_user}","gists_url":"https://api.github.com/users/jscs-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/jscs-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jscs-dev/subscriptions","organizations_url":"https://api.github.com/users/jscs-dev/orgs","repos_url":"https://api.github.com/users/jscs-dev/repos","events_url":"https://api.github.com/users/jscs-dev/events{/privacy}","received_events_url":"https://api.github.com/users/jscs-dev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jscs-dev/gulp-jscs","description":"Check JavaScript code style with jscs","fork":false,"url":"https://api.github.com/repos/jscs-dev/gulp-jscs","forks_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/forks","keys_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/teams","hooks_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/hooks","issue_events_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/issues/events{/number}","events_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/events","assignees_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/assignees{/user}","branches_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/branches{/branch}","tags_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/tags","blobs_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/git/refs{/sha}","trees_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/statuses/{sha}","languages_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/languages","stargazers_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/stargazers","contributors_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/contributors","subscribers_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/subscribers","subscription_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/subscription","commits_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/commits{/sha}","git_commits_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/git/commits{/sha}","comments_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/comments{/number}","issue_comment_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/issues/comments/{number}","contents_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/contents/{+path}","compare_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/merges","archive_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/downloads","issues_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/issues{/number}","pulls_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/pulls{/number}","milestones_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/milestones{/number}","notifications_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/labels{/name}","releases_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/releases{/id}","created_at":"2013-12-27T00:45:45Z","updated_at":"2015-02-08T13:58:37Z","pushed_at":"2015-02-08T13:58:37Z","git_url":"git://github.com/jscs-dev/gulp-jscs.git","ssh_url":"git@github.com:jscs-dev/gulp-jscs.git","clone_url":"https://github.com/jscs-dev/gulp-jscs.git","svn_url":"https://github.com/jscs-dev/gulp-jscs","homepage":null,"size":679,"stargazers_count":113,"watchers_count":113,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":31,"mirror_url":null,"open_issues_count":9,"forks":31,"open_issues":9,"watchers":113,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jscs-dev/gulp-jscs/pulls/66"},"html":{"href":"https://github.com/jscs-dev/gulp-jscs/pull/66"},"issue":{"href":"https://api.github.com/repos/jscs-dev/gulp-jscs/issues/66"},"comments":{"href":"https://api.github.com/repos/jscs-dev/gulp-jscs/issues/66/comments"},"review_comments":{"href":"https://api.github.com/repos/jscs-dev/gulp-jscs/pulls/66/comments"},"review_comment":{"href":"https://api.github.com/repos/jscs-dev/gulp-jscs/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/jscs-dev/gulp-jscs/pulls/66/commits"},"statuses":{"href":"https://api.github.com/repos/jscs-dev/gulp-jscs/statuses/e28598a001a483c930127b49634f58fc098f2cd7"}}}}