{"action":"closed","number":26,"pull_request":{"url":"https://api.github.com/repos/anandthakker/doiuse/pulls/26","id":47733600,"html_url":"https://github.com/anandthakker/doiuse/pull/26","diff_url":"https://github.com/anandthakker/doiuse/pull/26.diff","patch_url":"https://github.com/anandthakker/doiuse/pull/26.patch","issue_url":"https://api.github.com/repos/anandthakker/doiuse/issues/26","number":26,"state":"closed","locked":false,"title":"#24 use PostCSS result.warn API to send messages as well","user":{"login":"sebastienbarre","id":329967,"avatar_url":"https://avatars.githubusercontent.com/u/329967?v=3","gravatar_id":"","url":"https://api.github.com/users/sebastienbarre","html_url":"https://github.com/sebastienbarre","followers_url":"https://api.github.com/users/sebastienbarre/followers","following_url":"https://api.github.com/users/sebastienbarre/following{/other_user}","gists_url":"https://api.github.com/users/sebastienbarre/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastienbarre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastienbarre/subscriptions","organizations_url":"https://api.github.com/users/sebastienbarre/orgs","repos_url":"https://api.github.com/users/sebastienbarre/repos","events_url":"https://api.github.com/users/sebastienbarre/events{/privacy}","received_events_url":"https://api.github.com/users/sebastienbarre/received_events","type":"User","site_admin":false},"body":"This addresses issue #24 by pushing the warning message using the PostCSS [API](https://github.com/postcss/postcss/blob/master/docs/guidelines/plugin.md#32-use-resultwarn-for-warnings):\r\n```\r\n  result.warn(message, { node: usage, plugin: 'doiuse' }) \r\n```\r\nThis has no visible side-effect unless the warnings are handled downstream, either by looping over [the warnings array](https://github.com/postcss/postcss/blob/master/docs/api.md#resultwarnings) and outputting them to the console, or by using a pretty-printer like [`postcss-reporter`](https://github.com/postcss/postcss-reporter).\r\n\r\nThis PR also displays `feature` in parenthesis at the end of the message. This can in turn be leveraged to suppress the corresponding warning using the new [`ignore`](https://github.com/anandthakker/doiuse/pull/25) option. The tests were updated accordingly.\r\n\r\nHere is an output example when using `doiuse` from [`webpack`](http://webpack.github.io/) + [`postcss-loader`](https://github.com/postcss/postcss-loader), note how it flows with other PostCSS plugins that comply with the `result.warn` API (here, [`stylelint`](https://github.com/stylelint/stylelint) and [`postcss-bem-linter`](https://github.com/postcss/postcss-bem-linter)):\r\n\r\n```\r\n$ webpack\r\nsrc/css/App.css\r\n2:5   ⚠  Expected indentation of 2 spaces (indentation) [stylelint]\r\n\r\nsrc/css/Vote.css\r\n13:1  ⚠  Invalid component selector \".Foo\" [postcss-bem-linter]\r\n\r\nsrc/css/typography.css\r\n10:3  ⚠  rem (root em) units not supported by: IE (8,9,10) (rem) [doiuse]\r\n14:3  ⚠  rem (root em) units not supported by: IE (8,9,10) (rem) [doiuse]\r\n```\r\n\r\nThanks","created_at":"2015-10-15T00:57:18Z","updated_at":"2015-10-16T12:20:58Z","closed_at":"2015-10-16T12:20:58Z","merged_at":"2015-10-16T12:20:58Z","merge_commit_sha":"b855f0f04c9adc65af76face03a3ed24001964e1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/anandthakker/doiuse/pulls/26/commits","review_comments_url":"https://api.github.com/repos/anandthakker/doiuse/pulls/26/comments","review_comment_url":"https://api.github.com/repos/anandthakker/doiuse/pulls/comments{/number}","comments_url":"https://api.github.com/repos/anandthakker/doiuse/issues/26/comments","statuses_url":"https://api.github.com/repos/anandthakker/doiuse/statuses/585f1bfa8b9ce95f21f047da7cfa02ea06c7b70b","head":{"label":"sebastienbarre:resultWarn","ref":"resultWarn","sha":"585f1bfa8b9ce95f21f047da7cfa02ea06c7b70b","user":{"login":"sebastienbarre","id":329967,"avatar_url":"https://avatars.githubusercontent.com/u/329967?v=3","gravatar_id":"","url":"https://api.github.com/users/sebastienbarre","html_url":"https://github.com/sebastienbarre","followers_url":"https://api.github.com/users/sebastienbarre/followers","following_url":"https://api.github.com/users/sebastienbarre/following{/other_user}","gists_url":"https://api.github.com/users/sebastienbarre/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastienbarre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastienbarre/subscriptions","organizations_url":"https://api.github.com/users/sebastienbarre/orgs","repos_url":"https://api.github.com/users/sebastienbarre/repos","events_url":"https://api.github.com/users/sebastienbarre/events{/privacy}","received_events_url":"https://api.github.com/users/sebastienbarre/received_events","type":"User","site_admin":false},"repo":{"id":44080424,"name":"doiuse","full_name":"sebastienbarre/doiuse","owner":{"login":"sebastienbarre","id":329967,"avatar_url":"https://avatars.githubusercontent.com/u/329967?v=3","gravatar_id":"","url":"https://api.github.com/users/sebastienbarre","html_url":"https://github.com/sebastienbarre","followers_url":"https://api.github.com/users/sebastienbarre/followers","following_url":"https://api.github.com/users/sebastienbarre/following{/other_user}","gists_url":"https://api.github.com/users/sebastienbarre/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastienbarre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastienbarre/subscriptions","organizations_url":"https://api.github.com/users/sebastienbarre/orgs","repos_url":"https://api.github.com/users/sebastienbarre/repos","events_url":"https://api.github.com/users/sebastienbarre/events{/privacy}","received_events_url":"https://api.github.com/users/sebastienbarre/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sebastienbarre/doiuse","description":":bomb: Lint CSS for browser support against caniuse database.","fork":true,"url":"https://api.github.com/repos/sebastienbarre/doiuse","forks_url":"https://api.github.com/repos/sebastienbarre/doiuse/forks","keys_url":"https://api.github.com/repos/sebastienbarre/doiuse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sebastienbarre/doiuse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sebastienbarre/doiuse/teams","hooks_url":"https://api.github.com/repos/sebastienbarre/doiuse/hooks","issue_events_url":"https://api.github.com/repos/sebastienbarre/doiuse/issues/events{/number}","events_url":"https://api.github.com/repos/sebastienbarre/doiuse/events","assignees_url":"https://api.github.com/repos/sebastienbarre/doiuse/assignees{/user}","branches_url":"https://api.github.com/repos/sebastienbarre/doiuse/branches{/branch}","tags_url":"https://api.github.com/repos/sebastienbarre/doiuse/tags","blobs_url":"https://api.github.com/repos/sebastienbarre/doiuse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sebastienbarre/doiuse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sebastienbarre/doiuse/git/refs{/sha}","trees_url":"https://api.github.com/repos/sebastienbarre/doiuse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sebastienbarre/doiuse/statuses/{sha}","languages_url":"https://api.github.com/repos/sebastienbarre/doiuse/languages","stargazers_url":"https://api.github.com/repos/sebastienbarre/doiuse/stargazers","contributors_url":"https://api.github.com/repos/sebastienbarre/doiuse/contributors","subscribers_url":"https://api.github.com/repos/sebastienbarre/doiuse/subscribers","subscription_url":"https://api.github.com/repos/sebastienbarre/doiuse/subscription","commits_url":"https://api.github.com/repos/sebastienbarre/doiuse/commits{/sha}","git_commits_url":"https://api.github.com/repos/sebastienbarre/doiuse/git/commits{/sha}","comments_url":"https://api.github.com/repos/sebastienbarre/doiuse/comments{/number}","issue_comment_url":"https://api.github.com/repos/sebastienbarre/doiuse/issues/comments{/number}","contents_url":"https://api.github.com/repos/sebastienbarre/doiuse/contents/{+path}","compare_url":"https://api.github.com/repos/sebastienbarre/doiuse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sebastienbarre/doiuse/merges","archive_url":"https://api.github.com/repos/sebastienbarre/doiuse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sebastienbarre/doiuse/downloads","issues_url":"https://api.github.com/repos/sebastienbarre/doiuse/issues{/number}","pulls_url":"https://api.github.com/repos/sebastienbarre/doiuse/pulls{/number}","milestones_url":"https://api.github.com/repos/sebastienbarre/doiuse/milestones{/number}","notifications_url":"https://api.github.com/repos/sebastienbarre/doiuse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sebastienbarre/doiuse/labels{/name}","releases_url":"https://api.github.com/repos/sebastienbarre/doiuse/releases{/id}","created_at":"2015-10-12T02:48:55Z","updated_at":"2015-10-12T02:48:57Z","pushed_at":"2015-10-15T00:50:35Z","git_url":"git://github.com/sebastienbarre/doiuse.git","ssh_url":"git@github.com:sebastienbarre/doiuse.git","clone_url":"https://github.com/sebastienbarre/doiuse.git","svn_url":"https://github.com/sebastienbarre/doiuse","homepage":"http://doiuse.com","size":219,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"anandthakker:master","ref":"master","sha":"1392b37bd772bbb5d720616bea88efaf7294de9f","user":{"login":"anandthakker","id":4974151,"avatar_url":"https://avatars.githubusercontent.com/u/4974151?v=3","gravatar_id":"","url":"https://api.github.com/users/anandthakker","html_url":"https://github.com/anandthakker","followers_url":"https://api.github.com/users/anandthakker/followers","following_url":"https://api.github.com/users/anandthakker/following{/other_user}","gists_url":"https://api.github.com/users/anandthakker/gists{/gist_id}","starred_url":"https://api.github.com/users/anandthakker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anandthakker/subscriptions","organizations_url":"https://api.github.com/users/anandthakker/orgs","repos_url":"https://api.github.com/users/anandthakker/repos","events_url":"https://api.github.com/users/anandthakker/events{/privacy}","received_events_url":"https://api.github.com/users/anandthakker/received_events","type":"User","site_admin":false},"repo":{"id":26542739,"name":"doiuse","full_name":"anandthakker/doiuse","owner":{"login":"anandthakker","id":4974151,"avatar_url":"https://avatars.githubusercontent.com/u/4974151?v=3","gravatar_id":"","url":"https://api.github.com/users/anandthakker","html_url":"https://github.com/anandthakker","followers_url":"https://api.github.com/users/anandthakker/followers","following_url":"https://api.github.com/users/anandthakker/following{/other_user}","gists_url":"https://api.github.com/users/anandthakker/gists{/gist_id}","starred_url":"https://api.github.com/users/anandthakker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anandthakker/subscriptions","organizations_url":"https://api.github.com/users/anandthakker/orgs","repos_url":"https://api.github.com/users/anandthakker/repos","events_url":"https://api.github.com/users/anandthakker/events{/privacy}","received_events_url":"https://api.github.com/users/anandthakker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/anandthakker/doiuse","description":":bomb: Lint CSS for browser support against caniuse database.","fork":false,"url":"https://api.github.com/repos/anandthakker/doiuse","forks_url":"https://api.github.com/repos/anandthakker/doiuse/forks","keys_url":"https://api.github.com/repos/anandthakker/doiuse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anandthakker/doiuse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anandthakker/doiuse/teams","hooks_url":"https://api.github.com/repos/anandthakker/doiuse/hooks","issue_events_url":"https://api.github.com/repos/anandthakker/doiuse/issues/events{/number}","events_url":"https://api.github.com/repos/anandthakker/doiuse/events","assignees_url":"https://api.github.com/repos/anandthakker/doiuse/assignees{/user}","branches_url":"https://api.github.com/repos/anandthakker/doiuse/branches{/branch}","tags_url":"https://api.github.com/repos/anandthakker/doiuse/tags","blobs_url":"https://api.github.com/repos/anandthakker/doiuse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anandthakker/doiuse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anandthakker/doiuse/git/refs{/sha}","trees_url":"https://api.github.com/repos/anandthakker/doiuse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anandthakker/doiuse/statuses/{sha}","languages_url":"https://api.github.com/repos/anandthakker/doiuse/languages","stargazers_url":"https://api.github.com/repos/anandthakker/doiuse/stargazers","contributors_url":"https://api.github.com/repos/anandthakker/doiuse/contributors","subscribers_url":"https://api.github.com/repos/anandthakker/doiuse/subscribers","subscription_url":"https://api.github.com/repos/anandthakker/doiuse/subscription","commits_url":"https://api.github.com/repos/anandthakker/doiuse/commits{/sha}","git_commits_url":"https://api.github.com/repos/anandthakker/doiuse/git/commits{/sha}","comments_url":"https://api.github.com/repos/anandthakker/doiuse/comments{/number}","issue_comment_url":"https://api.github.com/repos/anandthakker/doiuse/issues/comments{/number}","contents_url":"https://api.github.com/repos/anandthakker/doiuse/contents/{+path}","compare_url":"https://api.github.com/repos/anandthakker/doiuse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anandthakker/doiuse/merges","archive_url":"https://api.github.com/repos/anandthakker/doiuse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anandthakker/doiuse/downloads","issues_url":"https://api.github.com/repos/anandthakker/doiuse/issues{/number}","pulls_url":"https://api.github.com/repos/anandthakker/doiuse/pulls{/number}","milestones_url":"https://api.github.com/repos/anandthakker/doiuse/milestones{/number}","notifications_url":"https://api.github.com/repos/anandthakker/doiuse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anandthakker/doiuse/labels{/name}","releases_url":"https://api.github.com/repos/anandthakker/doiuse/releases{/id}","created_at":"2014-11-12T15:37:16Z","updated_at":"2015-10-16T09:40:03Z","pushed_at":"2015-10-16T12:20:58Z","git_url":"git://github.com/anandthakker/doiuse.git","ssh_url":"git@github.com:anandthakker/doiuse.git","clone_url":"https://github.com/anandthakker/doiuse.git","svn_url":"https://github.com/anandthakker/doiuse","homepage":"http://doiuse.com","size":513,"stargazers_count":153,"watchers_count":153,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":5,"forks":4,"open_issues":5,"watchers":153,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/anandthakker/doiuse/pulls/26"},"html":{"href":"https://github.com/anandthakker/doiuse/pull/26"},"issue":{"href":"https://api.github.com/repos/anandthakker/doiuse/issues/26"},"comments":{"href":"https://api.github.com/repos/anandthakker/doiuse/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/anandthakker/doiuse/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/anandthakker/doiuse/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/anandthakker/doiuse/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/anandthakker/doiuse/statuses/585f1bfa8b9ce95f21f047da7cfa02ea06c7b70b"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"anandthakker","id":4974151,"avatar_url":"https://avatars.githubusercontent.com/u/4974151?v=3","gravatar_id":"","url":"https://api.github.com/users/anandthakker","html_url":"https://github.com/anandthakker","followers_url":"https://api.github.com/users/anandthakker/followers","following_url":"https://api.github.com/users/anandthakker/following{/other_user}","gists_url":"https://api.github.com/users/anandthakker/gists{/gist_id}","starred_url":"https://api.github.com/users/anandthakker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anandthakker/subscriptions","organizations_url":"https://api.github.com/users/anandthakker/orgs","repos_url":"https://api.github.com/users/anandthakker/repos","events_url":"https://api.github.com/users/anandthakker/events{/privacy}","received_events_url":"https://api.github.com/users/anandthakker/received_events","type":"User","site_admin":false},"comments":3,"review_comments":0,"commits":1,"additions":39,"deletions":37,"changed_files":2}}