{"action":"created","comment":{"url":"https://api.github.com/repos/Homebrew/brew/pulls/comments/60520712","id":60520712,"diff_hunk":"@@ -1,87 +1,76 @@\n-#:  * `audit` [`--strict`] [`--online`] [<formulae>]:\n+#:  * `audit` [`--strict`] [`--online`] [`--display-cop-names`] [<formulae>]:\n #:    Check <formulae> for Homebrew coding style violations. This should be\n #:    run before submitting a new formula.\n #:\n #:    If no <formulae> are provided, all of them are checked.\n #:\n-#:    If `--strict` is passed, additional checks are run. This should be used\n-#:    when creating for new formulae.\n+#:    If `--strict` is passed, additional checks are run, including Rubocop","path":"Library/Homebrew/cmd/audit.rb","position":10,"original_position":10,"commit_id":"7849189b71c49848817f93100734106b9db548e6","original_commit_id":"7849189b71c49848817f93100734106b9db548e6","user":{"login":"UniqMartin","id":11892150,"avatar_url":"https://avatars.githubusercontent.com/u/11892150?v=3","gravatar_id":"","url":"https://api.github.com/users/UniqMartin","html_url":"https://github.com/UniqMartin","followers_url":"https://api.github.com/users/UniqMartin/followers","following_url":"https://api.github.com/users/UniqMartin/following{/other_user}","gists_url":"https://api.github.com/users/UniqMartin/gists{/gist_id}","starred_url":"https://api.github.com/users/UniqMartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UniqMartin/subscriptions","organizations_url":"https://api.github.com/users/UniqMartin/orgs","repos_url":"https://api.github.com/users/UniqMartin/repos","events_url":"https://api.github.com/users/UniqMartin/events{/privacy}","received_events_url":"https://api.github.com/users/UniqMartin/received_events","type":"User","site_admin":false},"body":"Alright, switching into super-pedantic mode: The project name is “Rubo**C**op”, not “Rubocop”. (This is just one of several instances.)","created_at":"2016-04-21T03:04:06Z","updated_at":"2016-04-21T03:04:06Z","html_url":"https://github.com/Homebrew/brew/pull/112#discussion_r60520712","pull_request_url":"https://api.github.com/repos/Homebrew/brew/pulls/112","_links":{"self":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/comments/60520712"},"html":{"href":"https://github.com/Homebrew/brew/pull/112#discussion_r60520712"},"pull_request":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/112"}}},"pull_request":{"url":"https://api.github.com/repos/Homebrew/brew/pulls/112","id":66927814,"html_url":"https://github.com/Homebrew/brew/pull/112","diff_url":"https://github.com/Homebrew/brew/pull/112.diff","patch_url":"https://github.com/Homebrew/brew/pull/112.patch","issue_url":"https://api.github.com/repos/Homebrew/brew/issues/112","number":112,"state":"open","locked":false,"title":"brew-audit: move style checks into main audit output","user":{"login":"apjanke","id":2618447,"avatar_url":"https://avatars.githubusercontent.com/u/2618447?v=3","gravatar_id":"","url":"https://api.github.com/users/apjanke","html_url":"https://github.com/apjanke","followers_url":"https://api.github.com/users/apjanke/followers","following_url":"https://api.github.com/users/apjanke/following{/other_user}","gists_url":"https://api.github.com/users/apjanke/gists{/gist_id}","starred_url":"https://api.github.com/users/apjanke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apjanke/subscriptions","organizations_url":"https://api.github.com/users/apjanke/orgs","repos_url":"https://api.github.com/users/apjanke/repos","events_url":"https://api.github.com/users/apjanke/events{/privacy}","received_events_url":"https://api.github.com/users/apjanke/received_events","type":"User","site_admin":false},"body":"###   Checklist   ###\r\n\r\n- [X] Have you followed the guidelines in our [Contributing](https://github.com/Homebrew/brew/blob/master/.github/CONTRIBUTING.md) document?\r\n- [X] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/Homebrew/brew/pulls) for the same change?\r\n- [X] Have you added an explanation of what your changes do and why you'd like us to include them?\r\n- [ ] Have you written new tests for your changes? [Here's an example](https://github.com/Homebrew/homebrew/pull/49031).\r\n- [X] Have you successfully ran `brew tests` with your changes locally?\r\n\r\n###   Description   ###\r\n\r\nBreaks up the `brew style` part of the check for `brew audit --strict` and runs it separately for each formula, when that formula is being checked for other audits. This collects all violations for each formula in a single place, instead of doing `brew style` outputs for all formulae first, and then the other audit checks. Easier to read. It also makes the violation count at the end of the output include the `style` violations.\r\n\r\nBefore:\r\n\r\n<img width=\"713\" alt=\"audit-style - before\" src=\"https://cloud.githubusercontent.com/assets/2618447/14620836/1ea365c2-058d-11e6-9750-7426a58d0411.png\">\r\n\r\nAfter:\r\n\r\n<img width=\"713\" alt=\"audit-style - after\" src=\"https://cloud.githubusercontent.com/assets/2618447/14620838/22b4b814-058d-11e6-9450-5cfaa25b8f97.png\">\r\n\r\nThis also localizes the `--fix` argument support in `style` so that it doesn't leak to `audit`. I'm not sure if that's the right thing to do, though. `audit` isn't documented as supporting `--fix`, but that doesn't necessarily mean it isn't supposed to do it.\r\n\r\n###  Considerations  ###\r\n\r\n1. This turns off the syntax highlighting for the Rubocop output. I think that's fine, since we're uniformly using the main `audit` output style here. If someone really misses it, I could add an option to enable the old behavior, with all the style checks at the top and with coloring intact. Or we could add `Tty`-based coloring to `audit`'s own output, and you'll get it everywhere. (Personally, I don't care. I think this much use of color is distracting instead of helpful.)\r\n2. Will be slightly slower when auditing multiple formulae due to multiple Rubocop invocations. I don't think this is a big deal: the main use case is single-file formula audits, I think. And it was still perfectly tolerable when I ran it interactively on big batches like `brew audit --strict a*`.\r\n3. Is `brew audit` actually supposed to support `--fix`?","created_at":"2016-04-18T21:48:16Z","updated_at":"2016-04-21T03:04:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"26476b3e6ebdc41d3269de43bebe032be56c76b7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Homebrew/brew/pulls/112/commits","review_comments_url":"https://api.github.com/repos/Homebrew/brew/pulls/112/comments","review_comment_url":"https://api.github.com/repos/Homebrew/brew/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Homebrew/brew/issues/112/comments","statuses_url":"https://api.github.com/repos/Homebrew/brew/statuses/7849189b71c49848817f93100734106b9db548e6","head":{"label":"apjanke:audit-style-per-file","ref":"audit-style-per-file","sha":"7849189b71c49848817f93100734106b9db548e6","user":{"login":"apjanke","id":2618447,"avatar_url":"https://avatars.githubusercontent.com/u/2618447?v=3","gravatar_id":"","url":"https://api.github.com/users/apjanke","html_url":"https://github.com/apjanke","followers_url":"https://api.github.com/users/apjanke/followers","following_url":"https://api.github.com/users/apjanke/following{/other_user}","gists_url":"https://api.github.com/users/apjanke/gists{/gist_id}","starred_url":"https://api.github.com/users/apjanke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apjanke/subscriptions","organizations_url":"https://api.github.com/users/apjanke/orgs","repos_url":"https://api.github.com/users/apjanke/repos","events_url":"https://api.github.com/users/apjanke/events{/privacy}","received_events_url":"https://api.github.com/users/apjanke/received_events","type":"User","site_admin":false},"repo":{"id":55512108,"name":"brew","full_name":"apjanke/brew","owner":{"login":"apjanke","id":2618447,"avatar_url":"https://avatars.githubusercontent.com/u/2618447?v=3","gravatar_id":"","url":"https://api.github.com/users/apjanke","html_url":"https://github.com/apjanke","followers_url":"https://api.github.com/users/apjanke/followers","following_url":"https://api.github.com/users/apjanke/following{/other_user}","gists_url":"https://api.github.com/users/apjanke/gists{/gist_id}","starred_url":"https://api.github.com/users/apjanke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apjanke/subscriptions","organizations_url":"https://api.github.com/users/apjanke/orgs","repos_url":"https://api.github.com/users/apjanke/repos","events_url":"https://api.github.com/users/apjanke/events{/privacy}","received_events_url":"https://api.github.com/users/apjanke/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/apjanke/brew","description":":beer: The missing package manager for OS X","fork":true,"url":"https://api.github.com/repos/apjanke/brew","forks_url":"https://api.github.com/repos/apjanke/brew/forks","keys_url":"https://api.github.com/repos/apjanke/brew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apjanke/brew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apjanke/brew/teams","hooks_url":"https://api.github.com/repos/apjanke/brew/hooks","issue_events_url":"https://api.github.com/repos/apjanke/brew/issues/events{/number}","events_url":"https://api.github.com/repos/apjanke/brew/events","assignees_url":"https://api.github.com/repos/apjanke/brew/assignees{/user}","branches_url":"https://api.github.com/repos/apjanke/brew/branches{/branch}","tags_url":"https://api.github.com/repos/apjanke/brew/tags","blobs_url":"https://api.github.com/repos/apjanke/brew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apjanke/brew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apjanke/brew/git/refs{/sha}","trees_url":"https://api.github.com/repos/apjanke/brew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apjanke/brew/statuses/{sha}","languages_url":"https://api.github.com/repos/apjanke/brew/languages","stargazers_url":"https://api.github.com/repos/apjanke/brew/stargazers","contributors_url":"https://api.github.com/repos/apjanke/brew/contributors","subscribers_url":"https://api.github.com/repos/apjanke/brew/subscribers","subscription_url":"https://api.github.com/repos/apjanke/brew/subscription","commits_url":"https://api.github.com/repos/apjanke/brew/commits{/sha}","git_commits_url":"https://api.github.com/repos/apjanke/brew/git/commits{/sha}","comments_url":"https://api.github.com/repos/apjanke/brew/comments{/number}","issue_comment_url":"https://api.github.com/repos/apjanke/brew/issues/comments{/number}","contents_url":"https://api.github.com/repos/apjanke/brew/contents/{+path}","compare_url":"https://api.github.com/repos/apjanke/brew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apjanke/brew/merges","archive_url":"https://api.github.com/repos/apjanke/brew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apjanke/brew/downloads","issues_url":"https://api.github.com/repos/apjanke/brew/issues{/number}","pulls_url":"https://api.github.com/repos/apjanke/brew/pulls{/number}","milestones_url":"https://api.github.com/repos/apjanke/brew/milestones{/number}","notifications_url":"https://api.github.com/repos/apjanke/brew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apjanke/brew/labels{/name}","releases_url":"https://api.github.com/repos/apjanke/brew/releases{/id}","deployments_url":"https://api.github.com/repos/apjanke/brew/deployments","created_at":"2016-04-05T13:55:02Z","updated_at":"2016-04-05T13:55:04Z","pushed_at":"2016-04-21T02:41:35Z","git_url":"git://github.com/apjanke/brew.git","ssh_url":"git@github.com:apjanke/brew.git","clone_url":"https://github.com/apjanke/brew.git","svn_url":"https://github.com/apjanke/brew","homepage":"http://brew.sh","size":11433,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"Homebrew:master","ref":"master","sha":"b53f0c5ada753d5ded6f6fbe4f920a4a43696394","user":{"login":"Homebrew","id":1503512,"avatar_url":"https://avatars.githubusercontent.com/u/1503512?v=3","gravatar_id":"","url":"https://api.github.com/users/Homebrew","html_url":"https://github.com/Homebrew","followers_url":"https://api.github.com/users/Homebrew/followers","following_url":"https://api.github.com/users/Homebrew/following{/other_user}","gists_url":"https://api.github.com/users/Homebrew/gists{/gist_id}","starred_url":"https://api.github.com/users/Homebrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Homebrew/subscriptions","organizations_url":"https://api.github.com/users/Homebrew/orgs","repos_url":"https://api.github.com/users/Homebrew/repos","events_url":"https://api.github.com/users/Homebrew/events{/privacy}","received_events_url":"https://api.github.com/users/Homebrew/received_events","type":"Organization","site_admin":false},"repo":{"id":53238813,"name":"brew","full_name":"Homebrew/brew","owner":{"login":"Homebrew","id":1503512,"avatar_url":"https://avatars.githubusercontent.com/u/1503512?v=3","gravatar_id":"","url":"https://api.github.com/users/Homebrew","html_url":"https://github.com/Homebrew","followers_url":"https://api.github.com/users/Homebrew/followers","following_url":"https://api.github.com/users/Homebrew/following{/other_user}","gists_url":"https://api.github.com/users/Homebrew/gists{/gist_id}","starred_url":"https://api.github.com/users/Homebrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Homebrew/subscriptions","organizations_url":"https://api.github.com/users/Homebrew/orgs","repos_url":"https://api.github.com/users/Homebrew/repos","events_url":"https://api.github.com/users/Homebrew/events{/privacy}","received_events_url":"https://api.github.com/users/Homebrew/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Homebrew/brew","description":":beer: The missing package manager for OS X","fork":false,"url":"https://api.github.com/repos/Homebrew/brew","forks_url":"https://api.github.com/repos/Homebrew/brew/forks","keys_url":"https://api.github.com/repos/Homebrew/brew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Homebrew/brew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Homebrew/brew/teams","hooks_url":"https://api.github.com/repos/Homebrew/brew/hooks","issue_events_url":"https://api.github.com/repos/Homebrew/brew/issues/events{/number}","events_url":"https://api.github.com/repos/Homebrew/brew/events","assignees_url":"https://api.github.com/repos/Homebrew/brew/assignees{/user}","branches_url":"https://api.github.com/repos/Homebrew/brew/branches{/branch}","tags_url":"https://api.github.com/repos/Homebrew/brew/tags","blobs_url":"https://api.github.com/repos/Homebrew/brew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Homebrew/brew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Homebrew/brew/git/refs{/sha}","trees_url":"https://api.github.com/repos/Homebrew/brew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Homebrew/brew/statuses/{sha}","languages_url":"https://api.github.com/repos/Homebrew/brew/languages","stargazers_url":"https://api.github.com/repos/Homebrew/brew/stargazers","contributors_url":"https://api.github.com/repos/Homebrew/brew/contributors","subscribers_url":"https://api.github.com/repos/Homebrew/brew/subscribers","subscription_url":"https://api.github.com/repos/Homebrew/brew/subscription","commits_url":"https://api.github.com/repos/Homebrew/brew/commits{/sha}","git_commits_url":"https://api.github.com/repos/Homebrew/brew/git/commits{/sha}","comments_url":"https://api.github.com/repos/Homebrew/brew/comments{/number}","issue_comment_url":"https://api.github.com/repos/Homebrew/brew/issues/comments{/number}","contents_url":"https://api.github.com/repos/Homebrew/brew/contents/{+path}","compare_url":"https://api.github.com/repos/Homebrew/brew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Homebrew/brew/merges","archive_url":"https://api.github.com/repos/Homebrew/brew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Homebrew/brew/downloads","issues_url":"https://api.github.com/repos/Homebrew/brew/issues{/number}","pulls_url":"https://api.github.com/repos/Homebrew/brew/pulls{/number}","milestones_url":"https://api.github.com/repos/Homebrew/brew/milestones{/number}","notifications_url":"https://api.github.com/repos/Homebrew/brew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Homebrew/brew/labels{/name}","releases_url":"https://api.github.com/repos/Homebrew/brew/releases{/id}","deployments_url":"https://api.github.com/repos/Homebrew/brew/deployments","created_at":"2016-03-06T05:08:38Z","updated_at":"2016-04-21T00:59:24Z","pushed_at":"2016-04-21T02:41:35Z","git_url":"git://github.com/Homebrew/brew.git","ssh_url":"git@github.com:Homebrew/brew.git","clone_url":"https://github.com/Homebrew/brew.git","svn_url":"https://github.com/Homebrew/brew","homepage":"http://brew.sh","size":11530,"stargazers_count":537,"watchers_count":537,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":124,"mirror_url":null,"open_issues_count":34,"forks":124,"open_issues":34,"watchers":537,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/112"},"html":{"href":"https://github.com/Homebrew/brew/pull/112"},"issue":{"href":"https://api.github.com/repos/Homebrew/brew/issues/112"},"comments":{"href":"https://api.github.com/repos/Homebrew/brew/issues/112/comments"},"review_comments":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/112/comments"},"review_comment":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/112/commits"},"statuses":{"href":"https://api.github.com/repos/Homebrew/brew/statuses/7849189b71c49848817f93100734106b9db548e6"}}}}