{"action":"created","comment":{"url":"https://api.github.com/repos/clostra/dcdn/pulls/comments/135091054","pull_request_review_id":58464490,"id":135091054,"diff_hunk":"@@ -0,0 +1,152 @@\n+#!/bin/bash\n+\n+set -e\n+\n+if [ -z \"$ASAN_OPTIONS\" ]; then\n+    # https://github.com/clostra/dcdn/issues/27\n+    export ASAN_OPTIONS=strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1\n+fi\n+\n+if [ -z \"$LSAN_OPTIONS\" ]; then\n+    # https://github.com/clostra/dcdn/issues/50\n+    export LSAN_OPTIONS=suppressions=.lsan.supp\n+fi\n+\n+LOCAL_ORIGIN=localhost:8080\n+INJECTOR_TCP_PORT=8005\n+HELPER_TCP_PORT=5678\n+\n+HTTP_OK=200\n+HTTP_MOVED=301\n+HTTP_FOUND=302\n+HTTP_BAD_GATEWAY=502\n+\n+trap cleanup SIGINT SIGTERM EXIT\n+\n+all_jobs=()\n+function cleanup {\n+    kill -SIGINT ${all_jobs[*]} 2>/dev/null || true\n+}\n+\n+function element_in {\n+    local e\n+    for e in \"${@:2}\"; do [[ \"$e\" == \"$1\" ]] && return 0; done\n+    return 1\n+}\n+\n+function seconds_since_epoch {\n+    date +'%s'\n+}\n+\n+function now {\n+    date +'%M:%S'\n+}\n+\n+if `which stdbuf >/dev/null`; then\n+    unbuf='stdbuf -i0 -o0 -e0';\n+else\n+    echo \"Warning: output is buffered, stdout and stderr may have mixed order.\"\n+fi\n+\n+function prepend {\n+    while read line; do echo \"$(now) $1| $line\"; done\n+}\n+\n+function do_curl {\n+    local proxy=\"\"\n+    [ -n \"$1\" ] && proxy=\"-x localhost:$1\"\n+    local host=$2\n+    local code=$(curl $proxy $host -o /dev/null -w \"%{http_code}\" --silent --show-error)\n+    if ! element_in $code \"${@:3}\"; then\n+        echo \"Expected HTTP response one of (${@:3}) but received $code\"\n+        return 1\n+    fi\n+    return 0\n+}\n+\n+function test_n {\n+    local n=$1\n+    local host=$2\n+    local pids=()\n+    local i\n+    \n+    for ((i=0;i<$n;i++)); do","path":"test.sh","position":73,"original_position":73,"commit_id":"c1da9e7e3164e0aa3591be724ef24d490c8a47dd","original_commit_id":"c1da9e7e3164e0aa3591be724ef24d490c8a47dd","user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars1.githubusercontent.com/u/19940114?v=4","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: [$/${} is unnecessary on arithmetic variables.](https://www.codacy.com/app/shalunov/dcdn/pullRequest?prid=704616)","created_at":"2017-08-24T18:15:43Z","updated_at":"2017-08-24T18:15:43Z","html_url":"https://github.com/clostra/dcdn/pull/58#discussion_r135091054","pull_request_url":"https://api.github.com/repos/clostra/dcdn/pulls/58","_links":{"self":{"href":"https://api.github.com/repos/clostra/dcdn/pulls/comments/135091054"},"html":{"href":"https://github.com/clostra/dcdn/pull/58#discussion_r135091054"},"pull_request":{"href":"https://api.github.com/repos/clostra/dcdn/pulls/58"}}},"pull_request":{"url":"https://api.github.com/repos/clostra/dcdn/pulls/58","id":125071647,"html_url":"https://github.com/clostra/dcdn/pull/58","diff_url":"https://github.com/clostra/dcdn/pull/58.diff","patch_url":"https://github.com/clostra/dcdn/pull/58.patch","issue_url":"https://api.github.com/repos/clostra/dcdn/issues/58","number":58,"state":"open","locked":false,"title":"Libsodium (resolves #57)","user":{"login":"inetic","id":40127,"avatar_url":"https://avatars1.githubusercontent.com/u/40127?v=4","gravatar_id":"","url":"https://api.github.com/users/inetic","html_url":"https://github.com/inetic","followers_url":"https://api.github.com/users/inetic/followers","following_url":"https://api.github.com/users/inetic/following{/other_user}","gists_url":"https://api.github.com/users/inetic/gists{/gist_id}","starred_url":"https://api.github.com/users/inetic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inetic/subscriptions","organizations_url":"https://api.github.com/users/inetic/orgs","repos_url":"https://api.github.com/users/inetic/repos","events_url":"https://api.github.com/users/inetic/events{/privacy}","received_events_url":"https://api.github.com/users/inetic/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-06-12T07:04:57Z","updated_at":"2017-08-24T18:15:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7bcb67d92192e0d127ec47d62289f7193af7a2b5","assignee":{"login":"inetic","id":40127,"avatar_url":"https://avatars1.githubusercontent.com/u/40127?v=4","gravatar_id":"","url":"https://api.github.com/users/inetic","html_url":"https://github.com/inetic","followers_url":"https://api.github.com/users/inetic/followers","following_url":"https://api.github.com/users/inetic/following{/other_user}","gists_url":"https://api.github.com/users/inetic/gists{/gist_id}","starred_url":"https://api.github.com/users/inetic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inetic/subscriptions","organizations_url":"https://api.github.com/users/inetic/orgs","repos_url":"https://api.github.com/users/inetic/repos","events_url":"https://api.github.com/users/inetic/events{/privacy}","received_events_url":"https://api.github.com/users/inetic/received_events","type":"User","site_admin":false},"assignees":[{"login":"inetic","id":40127,"avatar_url":"https://avatars1.githubusercontent.com/u/40127?v=4","gravatar_id":"","url":"https://api.github.com/users/inetic","html_url":"https://github.com/inetic","followers_url":"https://api.github.com/users/inetic/followers","following_url":"https://api.github.com/users/inetic/following{/other_user}","gists_url":"https://api.github.com/users/inetic/gists{/gist_id}","starred_url":"https://api.github.com/users/inetic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inetic/subscriptions","organizations_url":"https://api.github.com/users/inetic/orgs","repos_url":"https://api.github.com/users/inetic/repos","events_url":"https://api.github.com/users/inetic/events{/privacy}","received_events_url":"https://api.github.com/users/inetic/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/clostra/dcdn/pulls/58/commits","review_comments_url":"https://api.github.com/repos/clostra/dcdn/pulls/58/comments","review_comment_url":"https://api.github.com/repos/clostra/dcdn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/clostra/dcdn/issues/58/comments","statuses_url":"https://api.github.com/repos/clostra/dcdn/statuses/c1da9e7e3164e0aa3591be724ef24d490c8a47dd","head":{"label":"inetic:libsodium","ref":"libsodium","sha":"c1da9e7e3164e0aa3591be724ef24d490c8a47dd","user":{"login":"inetic","id":40127,"avatar_url":"https://avatars1.githubusercontent.com/u/40127?v=4","gravatar_id":"","url":"https://api.github.com/users/inetic","html_url":"https://github.com/inetic","followers_url":"https://api.github.com/users/inetic/followers","following_url":"https://api.github.com/users/inetic/following{/other_user}","gists_url":"https://api.github.com/users/inetic/gists{/gist_id}","starred_url":"https://api.github.com/users/inetic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inetic/subscriptions","organizations_url":"https://api.github.com/users/inetic/orgs","repos_url":"https://api.github.com/users/inetic/repos","events_url":"https://api.github.com/users/inetic/events{/privacy}","received_events_url":"https://api.github.com/users/inetic/received_events","type":"User","site_admin":false},"repo":{"id":91021677,"name":"dcdn","full_name":"inetic/dcdn","owner":{"login":"inetic","id":40127,"avatar_url":"https://avatars1.githubusercontent.com/u/40127?v=4","gravatar_id":"","url":"https://api.github.com/users/inetic","html_url":"https://github.com/inetic","followers_url":"https://api.github.com/users/inetic/followers","following_url":"https://api.github.com/users/inetic/following{/other_user}","gists_url":"https://api.github.com/users/inetic/gists{/gist_id}","starred_url":"https://api.github.com/users/inetic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inetic/subscriptions","organizations_url":"https://api.github.com/users/inetic/orgs","repos_url":"https://api.github.com/users/inetic/repos","events_url":"https://api.github.com/users/inetic/events{/privacy}","received_events_url":"https://api.github.com/users/inetic/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/inetic/dcdn","description":"Decentralized Content Distribution Network","fork":true,"url":"https://api.github.com/repos/inetic/dcdn","forks_url":"https://api.github.com/repos/inetic/dcdn/forks","keys_url":"https://api.github.com/repos/inetic/dcdn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/inetic/dcdn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/inetic/dcdn/teams","hooks_url":"https://api.github.com/repos/inetic/dcdn/hooks","issue_events_url":"https://api.github.com/repos/inetic/dcdn/issues/events{/number}","events_url":"https://api.github.com/repos/inetic/dcdn/events","assignees_url":"https://api.github.com/repos/inetic/dcdn/assignees{/user}","branches_url":"https://api.github.com/repos/inetic/dcdn/branches{/branch}","tags_url":"https://api.github.com/repos/inetic/dcdn/tags","blobs_url":"https://api.github.com/repos/inetic/dcdn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/inetic/dcdn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/inetic/dcdn/git/refs{/sha}","trees_url":"https://api.github.com/repos/inetic/dcdn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/inetic/dcdn/statuses/{sha}","languages_url":"https://api.github.com/repos/inetic/dcdn/languages","stargazers_url":"https://api.github.com/repos/inetic/dcdn/stargazers","contributors_url":"https://api.github.com/repos/inetic/dcdn/contributors","subscribers_url":"https://api.github.com/repos/inetic/dcdn/subscribers","subscription_url":"https://api.github.com/repos/inetic/dcdn/subscription","commits_url":"https://api.github.com/repos/inetic/dcdn/commits{/sha}","git_commits_url":"https://api.github.com/repos/inetic/dcdn/git/commits{/sha}","comments_url":"https://api.github.com/repos/inetic/dcdn/comments{/number}","issue_comment_url":"https://api.github.com/repos/inetic/dcdn/issues/comments{/number}","contents_url":"https://api.github.com/repos/inetic/dcdn/contents/{+path}","compare_url":"https://api.github.com/repos/inetic/dcdn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/inetic/dcdn/merges","archive_url":"https://api.github.com/repos/inetic/dcdn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/inetic/dcdn/downloads","issues_url":"https://api.github.com/repos/inetic/dcdn/issues{/number}","pulls_url":"https://api.github.com/repos/inetic/dcdn/pulls{/number}","milestones_url":"https://api.github.com/repos/inetic/dcdn/milestones{/number}","notifications_url":"https://api.github.com/repos/inetic/dcdn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/inetic/dcdn/labels{/name}","releases_url":"https://api.github.com/repos/inetic/dcdn/releases{/id}","deployments_url":"https://api.github.com/repos/inetic/dcdn/deployments","created_at":"2017-05-11T20:42:21Z","updated_at":"2017-05-11T20:42:23Z","pushed_at":"2017-07-13T15:07:44Z","git_url":"git://github.com/inetic/dcdn.git","ssh_url":"git@github.com:inetic/dcdn.git","clone_url":"https://github.com/inetic/dcdn.git","svn_url":"https://github.com/inetic/dcdn","homepage":"","size":358,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"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":"clostra:master","ref":"master","sha":"0f188c6caebbafa170da9229856bbc40c66c2b6a","user":{"login":"clostra","id":25887866,"avatar_url":"https://avatars2.githubusercontent.com/u/25887866?v=4","gravatar_id":"","url":"https://api.github.com/users/clostra","html_url":"https://github.com/clostra","followers_url":"https://api.github.com/users/clostra/followers","following_url":"https://api.github.com/users/clostra/following{/other_user}","gists_url":"https://api.github.com/users/clostra/gists{/gist_id}","starred_url":"https://api.github.com/users/clostra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clostra/subscriptions","organizations_url":"https://api.github.com/users/clostra/orgs","repos_url":"https://api.github.com/users/clostra/repos","events_url":"https://api.github.com/users/clostra/events{/privacy}","received_events_url":"https://api.github.com/users/clostra/received_events","type":"Organization","site_admin":false},"repo":{"id":82525689,"name":"dcdn","full_name":"clostra/dcdn","owner":{"login":"clostra","id":25887866,"avatar_url":"https://avatars2.githubusercontent.com/u/25887866?v=4","gravatar_id":"","url":"https://api.github.com/users/clostra","html_url":"https://github.com/clostra","followers_url":"https://api.github.com/users/clostra/followers","following_url":"https://api.github.com/users/clostra/following{/other_user}","gists_url":"https://api.github.com/users/clostra/gists{/gist_id}","starred_url":"https://api.github.com/users/clostra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clostra/subscriptions","organizations_url":"https://api.github.com/users/clostra/orgs","repos_url":"https://api.github.com/users/clostra/repos","events_url":"https://api.github.com/users/clostra/events{/privacy}","received_events_url":"https://api.github.com/users/clostra/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/clostra/dcdn","description":"Decentralized Content Distribution Network","fork":false,"url":"https://api.github.com/repos/clostra/dcdn","forks_url":"https://api.github.com/repos/clostra/dcdn/forks","keys_url":"https://api.github.com/repos/clostra/dcdn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/clostra/dcdn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/clostra/dcdn/teams","hooks_url":"https://api.github.com/repos/clostra/dcdn/hooks","issue_events_url":"https://api.github.com/repos/clostra/dcdn/issues/events{/number}","events_url":"https://api.github.com/repos/clostra/dcdn/events","assignees_url":"https://api.github.com/repos/clostra/dcdn/assignees{/user}","branches_url":"https://api.github.com/repos/clostra/dcdn/branches{/branch}","tags_url":"https://api.github.com/repos/clostra/dcdn/tags","blobs_url":"https://api.github.com/repos/clostra/dcdn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/clostra/dcdn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/clostra/dcdn/git/refs{/sha}","trees_url":"https://api.github.com/repos/clostra/dcdn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/clostra/dcdn/statuses/{sha}","languages_url":"https://api.github.com/repos/clostra/dcdn/languages","stargazers_url":"https://api.github.com/repos/clostra/dcdn/stargazers","contributors_url":"https://api.github.com/repos/clostra/dcdn/contributors","subscribers_url":"https://api.github.com/repos/clostra/dcdn/subscribers","subscription_url":"https://api.github.com/repos/clostra/dcdn/subscription","commits_url":"https://api.github.com/repos/clostra/dcdn/commits{/sha}","git_commits_url":"https://api.github.com/repos/clostra/dcdn/git/commits{/sha}","comments_url":"https://api.github.com/repos/clostra/dcdn/comments{/number}","issue_comment_url":"https://api.github.com/repos/clostra/dcdn/issues/comments{/number}","contents_url":"https://api.github.com/repos/clostra/dcdn/contents/{+path}","compare_url":"https://api.github.com/repos/clostra/dcdn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/clostra/dcdn/merges","archive_url":"https://api.github.com/repos/clostra/dcdn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/clostra/dcdn/downloads","issues_url":"https://api.github.com/repos/clostra/dcdn/issues{/number}","pulls_url":"https://api.github.com/repos/clostra/dcdn/pulls{/number}","milestones_url":"https://api.github.com/repos/clostra/dcdn/milestones{/number}","notifications_url":"https://api.github.com/repos/clostra/dcdn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/clostra/dcdn/labels{/name}","releases_url":"https://api.github.com/repos/clostra/dcdn/releases{/id}","deployments_url":"https://api.github.com/repos/clostra/dcdn/deployments","created_at":"2017-02-20T06:46:00Z","updated_at":"2017-06-17T16:20:12Z","pushed_at":"2017-08-16T05:00:36Z","git_url":"git://github.com/clostra/dcdn.git","ssh_url":"git@github.com:clostra/dcdn.git","clone_url":"https://github.com/clostra/dcdn.git","svn_url":"https://github.com/clostra/dcdn","homepage":"","size":428,"stargazers_count":2,"watchers_count":2,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3,"mirror_url":null,"open_issues_count":26,"forks":3,"open_issues":26,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/clostra/dcdn/pulls/58"},"html":{"href":"https://github.com/clostra/dcdn/pull/58"},"issue":{"href":"https://api.github.com/repos/clostra/dcdn/issues/58"},"comments":{"href":"https://api.github.com/repos/clostra/dcdn/issues/58/comments"},"review_comments":{"href":"https://api.github.com/repos/clostra/dcdn/pulls/58/comments"},"review_comment":{"href":"https://api.github.com/repos/clostra/dcdn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/clostra/dcdn/pulls/58/commits"},"statuses":{"href":"https://api.github.com/repos/clostra/dcdn/statuses/c1da9e7e3164e0aa3591be724ef24d490c8a47dd"}}}}
{"actor":{"display_login":"codacy-bot"}}