{"action":"closed","issue":{"url":"https://api.github.com/repos/alibaba/pouch/issues/124","repository_url":"https://api.github.com/repos/alibaba/pouch","labels_url":"https://api.github.com/repos/alibaba/pouch/issues/124/labels{/name}","comments_url":"https://api.github.com/repos/alibaba/pouch/issues/124/comments","events_url":"https://api.github.com/repos/alibaba/pouch/issues/124/events","html_url":"https://github.com/alibaba/pouch/issues/124","id":275219735,"number":124,"title":"[bug] go report tells code needs improvement","user":{"login":"allencloud","id":9465626,"avatar_url":"https://avatars3.githubusercontent.com/u/9465626?v=4","gravatar_id":"","url":"https://api.github.com/users/allencloud","html_url":"https://github.com/allencloud","followers_url":"https://api.github.com/users/allencloud/followers","following_url":"https://api.github.com/users/allencloud/following{/other_user}","gists_url":"https://api.github.com/users/allencloud/gists{/gist_id}","starred_url":"https://api.github.com/users/allencloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allencloud/subscriptions","organizations_url":"https://api.github.com/users/allencloud/orgs","repos_url":"https://api.github.com/users/allencloud/repos","events_url":"https://api.github.com/users/allencloud/events{/privacy}","received_events_url":"https://api.github.com/users/allencloud/received_events","type":"User","site_admin":false},"labels":[{"id":684575943,"url":"https://api.github.com/repos/alibaba/pouch/labels/kind/bug","name":"kind/bug","color":"f77e56","default":false}],"state":"closed","locked":false,"assignee":{"login":"zhubingbing","id":5975561,"avatar_url":"https://avatars0.githubusercontent.com/u/5975561?v=4","gravatar_id":"","url":"https://api.github.com/users/zhubingbing","html_url":"https://github.com/zhubingbing","followers_url":"https://api.github.com/users/zhubingbing/followers","following_url":"https://api.github.com/users/zhubingbing/following{/other_user}","gists_url":"https://api.github.com/users/zhubingbing/gists{/gist_id}","starred_url":"https://api.github.com/users/zhubingbing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhubingbing/subscriptions","organizations_url":"https://api.github.com/users/zhubingbing/orgs","repos_url":"https://api.github.com/users/zhubingbing/repos","events_url":"https://api.github.com/users/zhubingbing/events{/privacy}","received_events_url":"https://api.github.com/users/zhubingbing/received_events","type":"User","site_admin":false},"assignees":[{"login":"zhubingbing","id":5975561,"avatar_url":"https://avatars0.githubusercontent.com/u/5975561?v=4","gravatar_id":"","url":"https://api.github.com/users/zhubingbing","html_url":"https://github.com/zhubingbing","followers_url":"https://api.github.com/users/zhubingbing/followers","following_url":"https://api.github.com/users/zhubingbing/following{/other_user}","gists_url":"https://api.github.com/users/zhubingbing/gists{/gist_id}","starred_url":"https://api.github.com/users/zhubingbing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhubingbing/subscriptions","organizations_url":"https://api.github.com/users/zhubingbing/orgs","repos_url":"https://api.github.com/users/zhubingbing/repos","events_url":"https://api.github.com/users/zhubingbing/events{/privacy}","received_events_url":"https://api.github.com/users/zhubingbing/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2017-11-20T02:27:42Z","updated_at":"2017-11-21T15:48:48Z","closed_at":"2017-11-21T15:48:48Z","author_association":"MEMBER","body":"**Issue Description**\r\n\r\nIn README.md if we click `go report`, we will turn to link https://goreportcard.com/report/github.com/alibaba/pouch\r\n\r\nThere we found that there are several parts to be improve, such as:\r\n\r\n```\r\ngo vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.\r\npouch/cli/pull.go\r\nLine 94: error: unrecognized printf verb 'r' (vet)\r\nLine 102: error: unrecognized printf verb 'r' (vet)\r\nLine 109: error: unrecognized printf verb 'r' (vet)\r\n```\r\n\r\nand \r\n\r\n```\r\nGocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.\r\npouch/volume/core.go\r\nLine 95: warning: cyclomatic complexity 16 of function (*Core).CreateVolume() is high (> 15) (gocyclo)\r\npouch/ctrd/image.go\r\nLine 130: warning: cyclomatic complexity 22 of function (*Client).fetchProgress() is high (> 15) (gocyclo)\r\n```\r\n\r\nand\r\n\r\n```\r\nMisspell Finds commonly misspelled English words\r\npouch/test/pouch_api_help_test.go\r\nLine 15: warning: \"begining\" is a misspelling of \"beginning\" (misspell)\r\npouch/test/pouch_cli_help_test.go\r\nLine 17: warning: \"begining\" is a misspelling of \"beginning\" (misspell)\r\npouch/test/pouch_cli_version_test.go\r\nLine 17: warning: \"begining\" is a misspelling of \"beginning\" (misspell)\r\npouch/volume/driver/driver.go\r\nLine 150: warning: \"registed\" is a misspelling of \"registered\" (misspell)\r\n```\r\n\r\nand so so.\r\n\r\nThese all needs fixed. "}}
{"actor":{"display_login":"allencloud"}}