{"action":"created","comment":{"url":"https://api.github.com/repos/sonarwhal/sonarwhal/pulls/comments/176266078","pull_request_review_id":105935802,"id":176266078,"diff_hunk":"@@ -49,12 +49,20 @@ const getFileName = (resource: string) => {\n  * Try to determine the resource's file extension.\n  */\n const getFileExtension = (resource: string): string => {\n-    /*\n-     * The url needs to be parsed first\n-     * otherwise the result from path.extname could be incorrect, e.g.: https://sonarwhal.com => '.com'\n-     */\n-    return path.extname(url.parse(resource).pathname)\n-        .split('.')\n+    let url: URL;\n+\n+    try {\n+        /*\n+         * he url needs to be parsed first","path":"packages/sonarwhal/src/lib/utils/misc.ts","position":22,"original_position":22,"commit_id":"5563b37c8bb47244f74af8b306895a276ae68101","original_commit_id":"5563b37c8bb47244f74af8b306895a276ae68101","user":{"login":"alrra","id":1223565,"avatar_url":"https://avatars1.githubusercontent.com/u/1223565?v=4","gravatar_id":"","url":"https://api.github.com/users/alrra","html_url":"https://github.com/alrra","followers_url":"https://api.github.com/users/alrra/followers","following_url":"https://api.github.com/users/alrra/following{/other_user}","gists_url":"https://api.github.com/users/alrra/gists{/gist_id}","starred_url":"https://api.github.com/users/alrra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alrra/subscriptions","organizations_url":"https://api.github.com/users/alrra/orgs","repos_url":"https://api.github.com/users/alrra/repos","events_url":"https://api.github.com/users/alrra/events{/privacy}","received_events_url":"https://api.github.com/users/alrra/received_events","type":"User","site_admin":false},"body":"> **T**he","created_at":"2018-03-21T23:01:20Z","updated_at":"2018-03-21T23:01:50Z","html_url":"https://github.com/sonarwhal/sonarwhal/pull/903#discussion_r176266078","pull_request_url":"https://api.github.com/repos/sonarwhal/sonarwhal/pulls/903","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/sonarwhal/sonarwhal/pulls/comments/176266078"},"html":{"href":"https://github.com/sonarwhal/sonarwhal/pull/903#discussion_r176266078"},"pull_request":{"href":"https://api.github.com/repos/sonarwhal/sonarwhal/pulls/903"}}},"pull_request":{"url":"https://api.github.com/repos/sonarwhal/sonarwhal/pulls/903","id":176339373,"html_url":"https://github.com/sonarwhal/sonarwhal/pull/903","diff_url":"https://github.com/sonarwhal/sonarwhal/pull/903.diff","patch_url":"https://github.com/sonarwhal/sonarwhal/pull/903.patch","issue_url":"https://api.github.com/repos/sonarwhal/sonarwhal/issues/903","number":903,"state":"open","locked":false,"title":"Fix: Migrate to WHATWG URL standard","user":{"login":"sarvaje","id":1581288,"avatar_url":"https://avatars0.githubusercontent.com/u/1581288?v=4","gravatar_id":"","url":"https://api.github.com/users/sarvaje","html_url":"https://github.com/sarvaje","followers_url":"https://api.github.com/users/sarvaje/followers","following_url":"https://api.github.com/users/sarvaje/following{/other_user}","gists_url":"https://api.github.com/users/sarvaje/gists{/gist_id}","starred_url":"https://api.github.com/users/sarvaje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarvaje/subscriptions","organizations_url":"https://api.github.com/users/sarvaje/orgs","repos_url":"https://api.github.com/users/sarvaje/repos","events_url":"https://api.github.com/users/sarvaje/events{/privacy}","received_events_url":"https://api.github.com/users/sarvaje/received_events","type":"User","site_admin":false},"body":"<!--\r\n\r\nRead our pull request guide:\r\nhttps://sonarwhal.com/docs/contributor-guide/contributing/pull-requests/\r\n\r\nFor the following items put an \"x\" between the square brackets\r\n(i.e. [x]) if you completed the associated item.\r\n\r\n-->\r\n\r\n## Pull request checklist\r\n\r\nMake sure you:\r\n\r\n- [x] Signed the [Contributor License Agreement](https://cla.js.foundation/sonarwhal/sonarwhal)\r\n- [x] Followed the [commit message guidelines](https://sonarwhal.com/docs/contributor-guide/getting-started/pull-requests/#commit-messagess)\r\n\r\nFor non-trivial changes, please make sure you also:\r\n\r\n- [ ] Added/Updated related documentation.\r\n- [x] Added/Updated related tests.\r\n\r\n## Short description of the change(s)\r\n\r\n<!--\r\n\r\nIf this is a non-trivial change, include information such as what\r\nbenefits this change brings as well as possible drawbacks.\r\n\r\nIf this fixes an existing issue, include the relavant issue number(s).\r\n\r\nThank you for taking the time to open this PR!\r\n\r\n-->\r\n","created_at":"2018-03-20T22:24:33Z","updated_at":"2018-03-21T23:01:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"13a9eac4444f288bdaceeeb3f3061d71b4ea6d55","assignee":null,"assignees":[],"requested_reviewers":[{"login":"molant","id":606594,"avatar_url":"https://avatars0.githubusercontent.com/u/606594?v=4","gravatar_id":"","url":"https://api.github.com/users/molant","html_url":"https://github.com/molant","followers_url":"https://api.github.com/users/molant/followers","following_url":"https://api.github.com/users/molant/following{/other_user}","gists_url":"https://api.github.com/users/molant/gists{/gist_id}","starred_url":"https://api.github.com/users/molant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/molant/subscriptions","organizations_url":"https://api.github.com/users/molant/orgs","repos_url":"https://api.github.com/users/molant/repos","events_url":"https://api.github.com/users/molant/events{/privacy}","received_events_url":"https://api.github.com/users/molant/received_events","type":"User","site_admin":false},{"login":"austinkelleher","id":3771924,"avatar_url":"https://avatars0.githubusercontent.com/u/3771924?v=4","gravatar_id":"","url":"https://api.github.com/users/austinkelleher","html_url":"https://github.com/austinkelleher","followers_url":"https://api.github.com/users/austinkelleher/followers","following_url":"https://api.github.com/users/austinkelleher/following{/other_user}","gists_url":"https://api.github.com/users/austinkelleher/gists{/gist_id}","starred_url":"https://api.github.com/users/austinkelleher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/austinkelleher/subscriptions","organizations_url":"https://api.github.com/users/austinkelleher/orgs","repos_url":"https://api.github.com/users/austinkelleher/repos","events_url":"https://api.github.com/users/austinkelleher/events{/privacy}","received_events_url":"https://api.github.com/users/austinkelleher/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/sonarwhal/sonarwhal/pulls/903/commits","review_comments_url":"https://api.github.com/repos/sonarwhal/sonarwhal/pulls/903/comments","review_comment_url":"https://api.github.com/repos/sonarwhal/sonarwhal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sonarwhal/sonarwhal/issues/903/comments","statuses_url":"https://api.github.com/repos/sonarwhal/sonarwhal/statuses/5563b37c8bb47244f74af8b306895a276ae68101","head":{"label":"sarvaje:fix-871","ref":"fix-871","sha":"5563b37c8bb47244f74af8b306895a276ae68101","user":{"login":"sarvaje","id":1581288,"avatar_url":"https://avatars0.githubusercontent.com/u/1581288?v=4","gravatar_id":"","url":"https://api.github.com/users/sarvaje","html_url":"https://github.com/sarvaje","followers_url":"https://api.github.com/users/sarvaje/followers","following_url":"https://api.github.com/users/sarvaje/following{/other_user}","gists_url":"https://api.github.com/users/sarvaje/gists{/gist_id}","starred_url":"https://api.github.com/users/sarvaje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarvaje/subscriptions","organizations_url":"https://api.github.com/users/sarvaje/orgs","repos_url":"https://api.github.com/users/sarvaje/repos","events_url":"https://api.github.com/users/sarvaje/events{/privacy}","received_events_url":"https://api.github.com/users/sarvaje/received_events","type":"User","site_admin":false},"repo":{"id":95051759,"name":"sonarwhal","full_name":"sarvaje/sonarwhal","owner":{"login":"sarvaje","id":1581288,"avatar_url":"https://avatars0.githubusercontent.com/u/1581288?v=4","gravatar_id":"","url":"https://api.github.com/users/sarvaje","html_url":"https://github.com/sarvaje","followers_url":"https://api.github.com/users/sarvaje/followers","following_url":"https://api.github.com/users/sarvaje/following{/other_user}","gists_url":"https://api.github.com/users/sarvaje/gists{/gist_id}","starred_url":"https://api.github.com/users/sarvaje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarvaje/subscriptions","organizations_url":"https://api.github.com/users/sarvaje/orgs","repos_url":"https://api.github.com/users/sarvaje/repos","events_url":"https://api.github.com/users/sarvaje/events{/privacy}","received_events_url":"https://api.github.com/users/sarvaje/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sarvaje/sonarwhal","description":"A linting tool for the web","fork":true,"url":"https://api.github.com/repos/sarvaje/sonarwhal","forks_url":"https://api.github.com/repos/sarvaje/sonarwhal/forks","keys_url":"https://api.github.com/repos/sarvaje/sonarwhal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sarvaje/sonarwhal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sarvaje/sonarwhal/teams","hooks_url":"https://api.github.com/repos/sarvaje/sonarwhal/hooks","issue_events_url":"https://api.github.com/repos/sarvaje/sonarwhal/issues/events{/number}","events_url":"https://api.github.com/repos/sarvaje/sonarwhal/events","assignees_url":"https://api.github.com/repos/sarvaje/sonarwhal/assignees{/user}","branches_url":"https://api.github.com/repos/sarvaje/sonarwhal/branches{/branch}","tags_url":"https://api.github.com/repos/sarvaje/sonarwhal/tags","blobs_url":"https://api.github.com/repos/sarvaje/sonarwhal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sarvaje/sonarwhal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sarvaje/sonarwhal/git/refs{/sha}","trees_url":"https://api.github.com/repos/sarvaje/sonarwhal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sarvaje/sonarwhal/statuses/{sha}","languages_url":"https://api.github.com/repos/sarvaje/sonarwhal/languages","stargazers_url":"https://api.github.com/repos/sarvaje/sonarwhal/stargazers","contributors_url":"https://api.github.com/repos/sarvaje/sonarwhal/contributors","subscribers_url":"https://api.github.com/repos/sarvaje/sonarwhal/subscribers","subscription_url":"https://api.github.com/repos/sarvaje/sonarwhal/subscription","commits_url":"https://api.github.com/repos/sarvaje/sonarwhal/commits{/sha}","git_commits_url":"https://api.github.com/repos/sarvaje/sonarwhal/git/commits{/sha}","comments_url":"https://api.github.com/repos/sarvaje/sonarwhal/comments{/number}","issue_comment_url":"https://api.github.com/repos/sarvaje/sonarwhal/issues/comments{/number}","contents_url":"https://api.github.com/repos/sarvaje/sonarwhal/contents/{+path}","compare_url":"https://api.github.com/repos/sarvaje/sonarwhal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sarvaje/sonarwhal/merges","archive_url":"https://api.github.com/repos/sarvaje/sonarwhal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sarvaje/sonarwhal/downloads","issues_url":"https://api.github.com/repos/sarvaje/sonarwhal/issues{/number}","pulls_url":"https://api.github.com/repos/sarvaje/sonarwhal/pulls{/number}","milestones_url":"https://api.github.com/repos/sarvaje/sonarwhal/milestones{/number}","notifications_url":"https://api.github.com/repos/sarvaje/sonarwhal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sarvaje/sonarwhal/labels{/name}","releases_url":"https://api.github.com/repos/sarvaje/sonarwhal/releases{/id}","deployments_url":"https://api.github.com/repos/sarvaje/sonarwhal/deployments","created_at":"2017-06-21T22:30:01Z","updated_at":"2017-11-27T18:12:26Z","pushed_at":"2018-03-21T22:23:00Z","git_url":"git://github.com/sarvaje/sonarwhal.git","ssh_url":"git@github.com:sarvaje/sonarwhal.git","clone_url":"https://github.com/sarvaje/sonarwhal.git","svn_url":"https://github.com/sarvaje/sonarwhal","homepage":"https://sonarwhal.com/","size":6498,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sonarwhal:master","ref":"master","sha":"c33c87fe2005250fc1724876b7405fe69019e6a0","user":{"login":"sonarwhal","id":25042266,"avatar_url":"https://avatars0.githubusercontent.com/u/25042266?v=4","gravatar_id":"","url":"https://api.github.com/users/sonarwhal","html_url":"https://github.com/sonarwhal","followers_url":"https://api.github.com/users/sonarwhal/followers","following_url":"https://api.github.com/users/sonarwhal/following{/other_user}","gists_url":"https://api.github.com/users/sonarwhal/gists{/gist_id}","starred_url":"https://api.github.com/users/sonarwhal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonarwhal/subscriptions","organizations_url":"https://api.github.com/users/sonarwhal/orgs","repos_url":"https://api.github.com/users/sonarwhal/repos","events_url":"https://api.github.com/users/sonarwhal/events{/privacy}","received_events_url":"https://api.github.com/users/sonarwhal/received_events","type":"Organization","site_admin":false},"repo":{"id":82211360,"name":"sonarwhal","full_name":"sonarwhal/sonarwhal","owner":{"login":"sonarwhal","id":25042266,"avatar_url":"https://avatars0.githubusercontent.com/u/25042266?v=4","gravatar_id":"","url":"https://api.github.com/users/sonarwhal","html_url":"https://github.com/sonarwhal","followers_url":"https://api.github.com/users/sonarwhal/followers","following_url":"https://api.github.com/users/sonarwhal/following{/other_user}","gists_url":"https://api.github.com/users/sonarwhal/gists{/gist_id}","starred_url":"https://api.github.com/users/sonarwhal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonarwhal/subscriptions","organizations_url":"https://api.github.com/users/sonarwhal/orgs","repos_url":"https://api.github.com/users/sonarwhal/repos","events_url":"https://api.github.com/users/sonarwhal/events{/privacy}","received_events_url":"https://api.github.com/users/sonarwhal/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sonarwhal/sonarwhal","description":"A linting tool for the web","fork":false,"url":"https://api.github.com/repos/sonarwhal/sonarwhal","forks_url":"https://api.github.com/repos/sonarwhal/sonarwhal/forks","keys_url":"https://api.github.com/repos/sonarwhal/sonarwhal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sonarwhal/sonarwhal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sonarwhal/sonarwhal/teams","hooks_url":"https://api.github.com/repos/sonarwhal/sonarwhal/hooks","issue_events_url":"https://api.github.com/repos/sonarwhal/sonarwhal/issues/events{/number}","events_url":"https://api.github.com/repos/sonarwhal/sonarwhal/events","assignees_url":"https://api.github.com/repos/sonarwhal/sonarwhal/assignees{/user}","branches_url":"https://api.github.com/repos/sonarwhal/sonarwhal/branches{/branch}","tags_url":"https://api.github.com/repos/sonarwhal/sonarwhal/tags","blobs_url":"https://api.github.com/repos/sonarwhal/sonarwhal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sonarwhal/sonarwhal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sonarwhal/sonarwhal/git/refs{/sha}","trees_url":"https://api.github.com/repos/sonarwhal/sonarwhal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sonarwhal/sonarwhal/statuses/{sha}","languages_url":"https://api.github.com/repos/sonarwhal/sonarwhal/languages","stargazers_url":"https://api.github.com/repos/sonarwhal/sonarwhal/stargazers","contributors_url":"https://api.github.com/repos/sonarwhal/sonarwhal/contributors","subscribers_url":"https://api.github.com/repos/sonarwhal/sonarwhal/subscribers","subscription_url":"https://api.github.com/repos/sonarwhal/sonarwhal/subscription","commits_url":"https://api.github.com/repos/sonarwhal/sonarwhal/commits{/sha}","git_commits_url":"https://api.github.com/repos/sonarwhal/sonarwhal/git/commits{/sha}","comments_url":"https://api.github.com/repos/sonarwhal/sonarwhal/comments{/number}","issue_comment_url":"https://api.github.com/repos/sonarwhal/sonarwhal/issues/comments{/number}","contents_url":"https://api.github.com/repos/sonarwhal/sonarwhal/contents/{+path}","compare_url":"https://api.github.com/repos/sonarwhal/sonarwhal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sonarwhal/sonarwhal/merges","archive_url":"https://api.github.com/repos/sonarwhal/sonarwhal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sonarwhal/sonarwhal/downloads","issues_url":"https://api.github.com/repos/sonarwhal/sonarwhal/issues{/number}","pulls_url":"https://api.github.com/repos/sonarwhal/sonarwhal/pulls{/number}","milestones_url":"https://api.github.com/repos/sonarwhal/sonarwhal/milestones{/number}","notifications_url":"https://api.github.com/repos/sonarwhal/sonarwhal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sonarwhal/sonarwhal/labels{/name}","releases_url":"https://api.github.com/repos/sonarwhal/sonarwhal/releases{/id}","deployments_url":"https://api.github.com/repos/sonarwhal/sonarwhal/deployments","created_at":"2017-02-16T18:15:31Z","updated_at":"2018-03-21T20:24:07Z","pushed_at":"2018-03-21T22:35:08Z","git_url":"git://github.com/sonarwhal/sonarwhal.git","ssh_url":"git@github.com:sonarwhal/sonarwhal.git","clone_url":"https://github.com/sonarwhal/sonarwhal.git","svn_url":"https://github.com/sonarwhal/sonarwhal","homepage":"https://sonarwhal.com/","size":6063,"stargazers_count":1286,"watchers_count":1286,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":86,"mirror_url":null,"archived":false,"open_issues_count":91,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":86,"open_issues":91,"watchers":1286,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sonarwhal/sonarwhal/pulls/903"},"html":{"href":"https://github.com/sonarwhal/sonarwhal/pull/903"},"issue":{"href":"https://api.github.com/repos/sonarwhal/sonarwhal/issues/903"},"comments":{"href":"https://api.github.com/repos/sonarwhal/sonarwhal/issues/903/comments"},"review_comments":{"href":"https://api.github.com/repos/sonarwhal/sonarwhal/pulls/903/comments"},"review_comment":{"href":"https://api.github.com/repos/sonarwhal/sonarwhal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sonarwhal/sonarwhal/pulls/903/commits"},"statuses":{"href":"https://api.github.com/repos/sonarwhal/sonarwhal/statuses/5563b37c8bb47244f74af8b306895a276ae68101"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"alrra"}}