{"action":"created","comment":{"url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/pulls/comments/191023605","pull_request_review_id":123529577,"id":191023605,"diff_hunk":"@@ -0,0 +1,37 @@\n+package codacy.metrics\n+\n+import codacy.docker.api.Source\n+import codacy.docker.api.metrics.FileMetrics\n+import org.specs2.mutable.Specification\n+\n+class ClocSpec extends Specification {\n+\n+  val scalaFileMetrics = FileMetrics(\"src/test/resources/DummyScalaFile.scala\",None, Some(5), Some(4))\n+  val rubyFileMetrics = FileMetrics(\"src/test/resources/HelloWorld.rb\", None, Some(10), Some(0))\n+\n+  val targetDir = \"src/test/resources\"\n+\n+  \"Cloc\" should {\n+    \"get metrics\" in {\n+      \"all files within a directory\" in {\n+        val expectedFileMetrics = Set(\n+          scalaFileMetrics,\n+          rubyFileMetrics\n+        )\n+        val fileMetricsMap = Cloc.apply(source = Source.Directory(targetDir), language = None, files = None, options = Map.empty)\n+\n+        fileMetricsMap.get.toSet shouldEqual expectedFileMetrics\n+      }\n+\n+      \"specific files\" in {\n+        val expectedFileMetrics = List(\n+          rubyFileMetrics\n+        )\n+\n+        val fileMetricsMap = Cloc.apply(source = Source.Directory(targetDir), language = None, files = Some(Set(Source.File(rubyFileMetrics.filename))), options = Map.empty)\n+\n+        fileMetricsMap.get shouldEqual expectedFileMetrics","path":"src/test/scala/codacy/metrics/ClocSpec.scala","position":33,"original_position":33,"commit_id":"d01725a9637bde0caac86fae3a678de03ae8ae18","original_commit_id":"d01725a9637bde0caac86fae3a678de03ae8ae18","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://app.codacy.com/assets/images/favicon.png) Issue found: [Usage of get on optional type.](https://app.codacy.com/app/Codacy/codacy-metrics-cloc/pullRequest?prid=1698853)","created_at":"2018-05-25T22:40:07Z","updated_at":"2018-05-25T22:40:07Z","html_url":"https://github.com/codacy/codacy-metrics-cloc/pull/1#discussion_r191023605","pull_request_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/pulls/1","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/codacy/codacy-metrics-cloc/pulls/comments/191023605"},"html":{"href":"https://github.com/codacy/codacy-metrics-cloc/pull/1#discussion_r191023605"},"pull_request":{"href":"https://api.github.com/repos/codacy/codacy-metrics-cloc/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/pulls/1","id":190707361,"html_url":"https://github.com/codacy/codacy-metrics-cloc/pull/1","diff_url":"https://github.com/codacy/codacy-metrics-cloc/pull/1.diff","patch_url":"https://github.com/codacy/codacy-metrics-cloc/pull/1.patch","issue_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/issues/1","number":1,"state":"open","locked":false,"title":"Inicial implementation","user":{"login":"xplosunn","id":7125555,"avatar_url":"https://avatars0.githubusercontent.com/u/7125555?v=4","gravatar_id":"","url":"https://api.github.com/users/xplosunn","html_url":"https://github.com/xplosunn","followers_url":"https://api.github.com/users/xplosunn/followers","following_url":"https://api.github.com/users/xplosunn/following{/other_user}","gists_url":"https://api.github.com/users/xplosunn/gists{/gist_id}","starred_url":"https://api.github.com/users/xplosunn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xplosunn/subscriptions","organizations_url":"https://api.github.com/users/xplosunn/orgs","repos_url":"https://api.github.com/users/xplosunn/repos","events_url":"https://api.github.com/users/xplosunn/events{/privacy}","received_events_url":"https://api.github.com/users/xplosunn/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-25T22:38:20Z","updated_at":"2018-05-25T22:40:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3dde8dcb71b70b12b4d56b1079bcd0bec7c9a035","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/pulls/1/commits","review_comments_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/pulls/1/comments","review_comment_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/issues/1/comments","statuses_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/statuses/d01725a9637bde0caac86fae3a678de03ae8ae18","head":{"label":"xplosunn:init","ref":"init","sha":"d01725a9637bde0caac86fae3a678de03ae8ae18","user":{"login":"xplosunn","id":7125555,"avatar_url":"https://avatars0.githubusercontent.com/u/7125555?v=4","gravatar_id":"","url":"https://api.github.com/users/xplosunn","html_url":"https://github.com/xplosunn","followers_url":"https://api.github.com/users/xplosunn/followers","following_url":"https://api.github.com/users/xplosunn/following{/other_user}","gists_url":"https://api.github.com/users/xplosunn/gists{/gist_id}","starred_url":"https://api.github.com/users/xplosunn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xplosunn/subscriptions","organizations_url":"https://api.github.com/users/xplosunn/orgs","repos_url":"https://api.github.com/users/xplosunn/repos","events_url":"https://api.github.com/users/xplosunn/events{/privacy}","received_events_url":"https://api.github.com/users/xplosunn/received_events","type":"User","site_admin":false},"repo":{"id":134910727,"name":"codacy-metrics-cloc","full_name":"xplosunn/codacy-metrics-cloc","owner":{"login":"xplosunn","id":7125555,"avatar_url":"https://avatars0.githubusercontent.com/u/7125555?v=4","gravatar_id":"","url":"https://api.github.com/users/xplosunn","html_url":"https://github.com/xplosunn","followers_url":"https://api.github.com/users/xplosunn/followers","following_url":"https://api.github.com/users/xplosunn/following{/other_user}","gists_url":"https://api.github.com/users/xplosunn/gists{/gist_id}","starred_url":"https://api.github.com/users/xplosunn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xplosunn/subscriptions","organizations_url":"https://api.github.com/users/xplosunn/orgs","repos_url":"https://api.github.com/users/xplosunn/repos","events_url":"https://api.github.com/users/xplosunn/events{/privacy}","received_events_url":"https://api.github.com/users/xplosunn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xplosunn/codacy-metrics-cloc","description":null,"fork":true,"url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc","forks_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/forks","keys_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/teams","hooks_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/hooks","issue_events_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/issues/events{/number}","events_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/events","assignees_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/assignees{/user}","branches_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/branches{/branch}","tags_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/tags","blobs_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/git/refs{/sha}","trees_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/statuses/{sha}","languages_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/languages","stargazers_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/stargazers","contributors_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/contributors","subscribers_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/subscribers","subscription_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/subscription","commits_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/commits{/sha}","git_commits_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/git/commits{/sha}","comments_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/comments{/number}","issue_comment_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/issues/comments{/number}","contents_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/contents/{+path}","compare_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/merges","archive_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/downloads","issues_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/issues{/number}","pulls_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/pulls{/number}","milestones_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/milestones{/number}","notifications_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/labels{/name}","releases_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/releases{/id}","deployments_url":"https://api.github.com/repos/xplosunn/codacy-metrics-cloc/deployments","created_at":"2018-05-25T22:35:13Z","updated_at":"2018-05-25T22:35:15Z","pushed_at":"2018-05-25T22:38:05Z","git_url":"git://github.com/xplosunn/codacy-metrics-cloc.git","ssh_url":"git@github.com:xplosunn/codacy-metrics-cloc.git","clone_url":"https://github.com/xplosunn/codacy-metrics-cloc.git","svn_url":"https://github.com/xplosunn/codacy-metrics-cloc","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"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":"codacy:master","ref":"master","sha":"d260b3306c1de380759f9bbdcd437d0dd7f4672b","user":{"login":"codacy","id":1834093,"avatar_url":"https://avatars0.githubusercontent.com/u/1834093?v=4","gravatar_id":"","url":"https://api.github.com/users/codacy","html_url":"https://github.com/codacy","followers_url":"https://api.github.com/users/codacy/followers","following_url":"https://api.github.com/users/codacy/following{/other_user}","gists_url":"https://api.github.com/users/codacy/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy/subscriptions","organizations_url":"https://api.github.com/users/codacy/orgs","repos_url":"https://api.github.com/users/codacy/repos","events_url":"https://api.github.com/users/codacy/events{/privacy}","received_events_url":"https://api.github.com/users/codacy/received_events","type":"Organization","site_admin":false},"repo":{"id":134910701,"name":"codacy-metrics-cloc","full_name":"codacy/codacy-metrics-cloc","owner":{"login":"codacy","id":1834093,"avatar_url":"https://avatars0.githubusercontent.com/u/1834093?v=4","gravatar_id":"","url":"https://api.github.com/users/codacy","html_url":"https://github.com/codacy","followers_url":"https://api.github.com/users/codacy/followers","following_url":"https://api.github.com/users/codacy/following{/other_user}","gists_url":"https://api.github.com/users/codacy/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy/subscriptions","organizations_url":"https://api.github.com/users/codacy/orgs","repos_url":"https://api.github.com/users/codacy/repos","events_url":"https://api.github.com/users/codacy/events{/privacy}","received_events_url":"https://api.github.com/users/codacy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codacy/codacy-metrics-cloc","description":null,"fork":false,"url":"https://api.github.com/repos/codacy/codacy-metrics-cloc","forks_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/forks","keys_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/teams","hooks_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/hooks","issue_events_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/issues/events{/number}","events_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/events","assignees_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/assignees{/user}","branches_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/branches{/branch}","tags_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/tags","blobs_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/git/refs{/sha}","trees_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/statuses/{sha}","languages_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/languages","stargazers_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/stargazers","contributors_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/contributors","subscribers_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/subscribers","subscription_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/subscription","commits_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/commits{/sha}","git_commits_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/git/commits{/sha}","comments_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/comments{/number}","issue_comment_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/issues/comments{/number}","contents_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/contents/{+path}","compare_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/merges","archive_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/downloads","issues_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/issues{/number}","pulls_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/pulls{/number}","milestones_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/milestones{/number}","notifications_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/labels{/name}","releases_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/releases{/id}","deployments_url":"https://api.github.com/repos/codacy/codacy-metrics-cloc/deployments","created_at":"2018-05-25T22:34:39Z","updated_at":"2018-05-25T22:34:41Z","pushed_at":"2018-05-25T22:38:20Z","git_url":"git://github.com/codacy/codacy-metrics-cloc.git","ssh_url":"git@github.com:codacy/codacy-metrics-cloc.git","clone_url":"https://github.com/codacy/codacy-metrics-cloc.git","svn_url":"https://github.com/codacy/codacy-metrics-cloc","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codacy/codacy-metrics-cloc/pulls/1"},"html":{"href":"https://github.com/codacy/codacy-metrics-cloc/pull/1"},"issue":{"href":"https://api.github.com/repos/codacy/codacy-metrics-cloc/issues/1"},"comments":{"href":"https://api.github.com/repos/codacy/codacy-metrics-cloc/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/codacy/codacy-metrics-cloc/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/codacy/codacy-metrics-cloc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codacy/codacy-metrics-cloc/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/codacy/codacy-metrics-cloc/statuses/d01725a9637bde0caac86fae3a678de03ae8ae18"}},"author_association":"NONE"}}
{"actor":{"display_login":"codacy-bot"}}