{"action":"closed","number":157,"pull_request":{"url":"https://api.github.com/repos/rossPatton/stylint/pulls/157","id":40445202,"html_url":"https://github.com/rossPatton/stylint/pull/157","diff_url":"https://github.com/rossPatton/stylint/pull/157.diff","patch_url":"https://github.com/rossPatton/stylint/pull/157.patch","issue_url":"https://api.github.com/repos/rossPatton/stylint/issues/157","number":157,"state":"closed","locked":false,"title":"Use Yargs for commandline arguments","user":{"login":"SimenB","id":1404810,"avatar_url":"https://avatars.githubusercontent.com/u/1404810?v=3","gravatar_id":"","url":"https://api.github.com/users/SimenB","html_url":"https://github.com/SimenB","followers_url":"https://api.github.com/users/SimenB/followers","following_url":"https://api.github.com/users/SimenB/following{/other_user}","gists_url":"https://api.github.com/users/SimenB/gists{/gist_id}","starred_url":"https://api.github.com/users/SimenB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimenB/subscriptions","organizations_url":"https://api.github.com/users/SimenB/orgs","repos_url":"https://api.github.com/users/SimenB/repos","events_url":"https://api.github.com/users/SimenB/events{/privacy}","received_events_url":"https://api.github.com/users/SimenB/received_events","type":"User","site_admin":false},"body":"Instead of handling CLI parsing ourselves, I think delegating to `yargs` is better.\r\n\r\nThe problem right now I think is that commandline-parsing is coupled to the whole app, instead of just passing along options for the main module to handle.\r\n\r\nSo instead of fighting with the tests only parsing options passed the first time (as `yargs` caches `process.argv`) and the process quitting if printing out version or help, I moved this logic into the `bin/stylint`-file, and init takes `options` as a parameter.\r\n\r\nVersion and help is only from the CLI, the main app doesn't care about that, thus I removed the tests for it. Add new tests for the CLI on just that? Unsure if it's necessary.\r\n\r\nOutput for `help` is now this, btw. Much nicer, imo!\r\n\r\n![image](https://cloud.githubusercontent.com/assets/1404810/8799324/9e2af14e-2fa9-11e5-9f73-5ff6c99c9548.png)\r\n\r\nThere is currently one test failing but that is failing on develop as well.","created_at":"2015-07-21T11:01:27Z","updated_at":"2015-07-22T04:44:38Z","closed_at":"2015-07-22T04:44:38Z","merged_at":"2015-07-22T04:44:38Z","merge_commit_sha":"b9096785f7dba3ca1147513be91ee82dddb78dcb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rossPatton/stylint/pulls/157/commits","review_comments_url":"https://api.github.com/repos/rossPatton/stylint/pulls/157/comments","review_comment_url":"https://api.github.com/repos/rossPatton/stylint/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rossPatton/stylint/issues/157/comments","statuses_url":"https://api.github.com/repos/rossPatton/stylint/statuses/22799920226cc45a922dcd367446860d6cd41c19","head":{"label":"SimenB:yargs","ref":"yargs","sha":"22799920226cc45a922dcd367446860d6cd41c19","user":{"login":"SimenB","id":1404810,"avatar_url":"https://avatars.githubusercontent.com/u/1404810?v=3","gravatar_id":"","url":"https://api.github.com/users/SimenB","html_url":"https://github.com/SimenB","followers_url":"https://api.github.com/users/SimenB/followers","following_url":"https://api.github.com/users/SimenB/following{/other_user}","gists_url":"https://api.github.com/users/SimenB/gists{/gist_id}","starred_url":"https://api.github.com/users/SimenB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimenB/subscriptions","organizations_url":"https://api.github.com/users/SimenB/orgs","repos_url":"https://api.github.com/users/SimenB/repos","events_url":"https://api.github.com/users/SimenB/events{/privacy}","received_events_url":"https://api.github.com/users/SimenB/received_events","type":"User","site_admin":false},"repo":{"id":39255633,"name":"stylint","full_name":"SimenB/stylint","owner":{"login":"SimenB","id":1404810,"avatar_url":"https://avatars.githubusercontent.com/u/1404810?v=3","gravatar_id":"","url":"https://api.github.com/users/SimenB","html_url":"https://github.com/SimenB","followers_url":"https://api.github.com/users/SimenB/followers","following_url":"https://api.github.com/users/SimenB/following{/other_user}","gists_url":"https://api.github.com/users/SimenB/gists{/gist_id}","starred_url":"https://api.github.com/users/SimenB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimenB/subscriptions","organizations_url":"https://api.github.com/users/SimenB/orgs","repos_url":"https://api.github.com/users/SimenB/repos","events_url":"https://api.github.com/users/SimenB/events{/privacy}","received_events_url":"https://api.github.com/users/SimenB/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SimenB/stylint","description":"CLI Linter for Stylus.","fork":true,"url":"https://api.github.com/repos/SimenB/stylint","forks_url":"https://api.github.com/repos/SimenB/stylint/forks","keys_url":"https://api.github.com/repos/SimenB/stylint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SimenB/stylint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SimenB/stylint/teams","hooks_url":"https://api.github.com/repos/SimenB/stylint/hooks","issue_events_url":"https://api.github.com/repos/SimenB/stylint/issues/events{/number}","events_url":"https://api.github.com/repos/SimenB/stylint/events","assignees_url":"https://api.github.com/repos/SimenB/stylint/assignees{/user}","branches_url":"https://api.github.com/repos/SimenB/stylint/branches{/branch}","tags_url":"https://api.github.com/repos/SimenB/stylint/tags","blobs_url":"https://api.github.com/repos/SimenB/stylint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SimenB/stylint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SimenB/stylint/git/refs{/sha}","trees_url":"https://api.github.com/repos/SimenB/stylint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SimenB/stylint/statuses/{sha}","languages_url":"https://api.github.com/repos/SimenB/stylint/languages","stargazers_url":"https://api.github.com/repos/SimenB/stylint/stargazers","contributors_url":"https://api.github.com/repos/SimenB/stylint/contributors","subscribers_url":"https://api.github.com/repos/SimenB/stylint/subscribers","subscription_url":"https://api.github.com/repos/SimenB/stylint/subscription","commits_url":"https://api.github.com/repos/SimenB/stylint/commits{/sha}","git_commits_url":"https://api.github.com/repos/SimenB/stylint/git/commits{/sha}","comments_url":"https://api.github.com/repos/SimenB/stylint/comments{/number}","issue_comment_url":"https://api.github.com/repos/SimenB/stylint/issues/comments{/number}","contents_url":"https://api.github.com/repos/SimenB/stylint/contents/{+path}","compare_url":"https://api.github.com/repos/SimenB/stylint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SimenB/stylint/merges","archive_url":"https://api.github.com/repos/SimenB/stylint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SimenB/stylint/downloads","issues_url":"https://api.github.com/repos/SimenB/stylint/issues{/number}","pulls_url":"https://api.github.com/repos/SimenB/stylint/pulls{/number}","milestones_url":"https://api.github.com/repos/SimenB/stylint/milestones{/number}","notifications_url":"https://api.github.com/repos/SimenB/stylint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SimenB/stylint/labels{/name}","releases_url":"https://api.github.com/repos/SimenB/stylint/releases{/id}","created_at":"2015-07-17T13:34:11Z","updated_at":"2015-07-17T13:34:14Z","pushed_at":"2015-07-21T12:32:18Z","git_url":"git://github.com/SimenB/stylint.git","ssh_url":"git@github.com:SimenB/stylint.git","clone_url":"https://github.com/SimenB/stylint.git","svn_url":"https://github.com/SimenB/stylint","homepage":"https://rosspatton.github.io/stylint/","size":1359,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rossPatton:develop","ref":"develop","sha":"0bc5fbfcbe046fab6e5d13eb9a03839bf133c2b5","user":{"login":"rossPatton","id":2379901,"avatar_url":"https://avatars.githubusercontent.com/u/2379901?v=3","gravatar_id":"","url":"https://api.github.com/users/rossPatton","html_url":"https://github.com/rossPatton","followers_url":"https://api.github.com/users/rossPatton/followers","following_url":"https://api.github.com/users/rossPatton/following{/other_user}","gists_url":"https://api.github.com/users/rossPatton/gists{/gist_id}","starred_url":"https://api.github.com/users/rossPatton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rossPatton/subscriptions","organizations_url":"https://api.github.com/users/rossPatton/orgs","repos_url":"https://api.github.com/users/rossPatton/repos","events_url":"https://api.github.com/users/rossPatton/events{/privacy}","received_events_url":"https://api.github.com/users/rossPatton/received_events","type":"User","site_admin":false},"repo":{"id":27864574,"name":"stylint","full_name":"rossPatton/stylint","owner":{"login":"rossPatton","id":2379901,"avatar_url":"https://avatars.githubusercontent.com/u/2379901?v=3","gravatar_id":"","url":"https://api.github.com/users/rossPatton","html_url":"https://github.com/rossPatton","followers_url":"https://api.github.com/users/rossPatton/followers","following_url":"https://api.github.com/users/rossPatton/following{/other_user}","gists_url":"https://api.github.com/users/rossPatton/gists{/gist_id}","starred_url":"https://api.github.com/users/rossPatton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rossPatton/subscriptions","organizations_url":"https://api.github.com/users/rossPatton/orgs","repos_url":"https://api.github.com/users/rossPatton/repos","events_url":"https://api.github.com/users/rossPatton/events{/privacy}","received_events_url":"https://api.github.com/users/rossPatton/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rossPatton/stylint","description":"CLI Linter for Stylus.","fork":false,"url":"https://api.github.com/repos/rossPatton/stylint","forks_url":"https://api.github.com/repos/rossPatton/stylint/forks","keys_url":"https://api.github.com/repos/rossPatton/stylint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rossPatton/stylint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rossPatton/stylint/teams","hooks_url":"https://api.github.com/repos/rossPatton/stylint/hooks","issue_events_url":"https://api.github.com/repos/rossPatton/stylint/issues/events{/number}","events_url":"https://api.github.com/repos/rossPatton/stylint/events","assignees_url":"https://api.github.com/repos/rossPatton/stylint/assignees{/user}","branches_url":"https://api.github.com/repos/rossPatton/stylint/branches{/branch}","tags_url":"https://api.github.com/repos/rossPatton/stylint/tags","blobs_url":"https://api.github.com/repos/rossPatton/stylint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rossPatton/stylint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rossPatton/stylint/git/refs{/sha}","trees_url":"https://api.github.com/repos/rossPatton/stylint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rossPatton/stylint/statuses/{sha}","languages_url":"https://api.github.com/repos/rossPatton/stylint/languages","stargazers_url":"https://api.github.com/repos/rossPatton/stylint/stargazers","contributors_url":"https://api.github.com/repos/rossPatton/stylint/contributors","subscribers_url":"https://api.github.com/repos/rossPatton/stylint/subscribers","subscription_url":"https://api.github.com/repos/rossPatton/stylint/subscription","commits_url":"https://api.github.com/repos/rossPatton/stylint/commits{/sha}","git_commits_url":"https://api.github.com/repos/rossPatton/stylint/git/commits{/sha}","comments_url":"https://api.github.com/repos/rossPatton/stylint/comments{/number}","issue_comment_url":"https://api.github.com/repos/rossPatton/stylint/issues/comments{/number}","contents_url":"https://api.github.com/repos/rossPatton/stylint/contents/{+path}","compare_url":"https://api.github.com/repos/rossPatton/stylint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rossPatton/stylint/merges","archive_url":"https://api.github.com/repos/rossPatton/stylint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rossPatton/stylint/downloads","issues_url":"https://api.github.com/repos/rossPatton/stylint/issues{/number}","pulls_url":"https://api.github.com/repos/rossPatton/stylint/pulls{/number}","milestones_url":"https://api.github.com/repos/rossPatton/stylint/milestones{/number}","notifications_url":"https://api.github.com/repos/rossPatton/stylint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rossPatton/stylint/labels{/name}","releases_url":"https://api.github.com/repos/rossPatton/stylint/releases{/id}","created_at":"2014-12-11T09:51:35Z","updated_at":"2015-07-20T21:49:21Z","pushed_at":"2015-07-22T04:44:38Z","git_url":"git://github.com/rossPatton/stylint.git","ssh_url":"git@github.com:rossPatton/stylint.git","clone_url":"https://github.com/rossPatton/stylint.git","svn_url":"https://github.com/rossPatton/stylint","homepage":"https://rosspatton.github.io/stylint/","size":2189,"stargazers_count":105,"watchers_count":105,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":13,"mirror_url":null,"open_issues_count":11,"forks":13,"open_issues":11,"watchers":105,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rossPatton/stylint/pulls/157"},"html":{"href":"https://github.com/rossPatton/stylint/pull/157"},"issue":{"href":"https://api.github.com/repos/rossPatton/stylint/issues/157"},"comments":{"href":"https://api.github.com/repos/rossPatton/stylint/issues/157/comments"},"review_comments":{"href":"https://api.github.com/repos/rossPatton/stylint/pulls/157/comments"},"review_comment":{"href":"https://api.github.com/repos/rossPatton/stylint/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rossPatton/stylint/pulls/157/commits"},"statuses":{"href":"https://api.github.com/repos/rossPatton/stylint/statuses/22799920226cc45a922dcd367446860d6cd41c19"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"rossPatton","id":2379901,"avatar_url":"https://avatars.githubusercontent.com/u/2379901?v=3","gravatar_id":"","url":"https://api.github.com/users/rossPatton","html_url":"https://github.com/rossPatton","followers_url":"https://api.github.com/users/rossPatton/followers","following_url":"https://api.github.com/users/rossPatton/following{/other_user}","gists_url":"https://api.github.com/users/rossPatton/gists{/gist_id}","starred_url":"https://api.github.com/users/rossPatton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rossPatton/subscriptions","organizations_url":"https://api.github.com/users/rossPatton/orgs","repos_url":"https://api.github.com/users/rossPatton/repos","events_url":"https://api.github.com/users/rossPatton/events{/privacy}","received_events_url":"https://api.github.com/users/rossPatton/received_events","type":"User","site_admin":false},"comments":1,"review_comments":3,"commits":1,"additions":71,"deletions":134,"changed_files":9}}