{"action":"created","comment":{"url":"https://api.github.com/repos/kusumotolab/kGenProg/pulls/comments/223962890","pull_request_review_id":163215502,"id":223962890,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMzk2Mjg5MA==","diff_hunk":"@@ -346,123 +425,290 @@ private static boolean isQuiet(final Builder builder) {\n       return builder.logLevel.equals(Level.ERROR);\n     }\n \n+    private static boolean needsParseConfigFile(String[] args) {\n+      return args.length == 0 || Arrays.asList(args)\n+          .contains(\"--config\");\n+    }\n+\n+    private void parseConfigFile() throws InvalidValueException, NoSuchFileException {\n+      if (Files.notExists(configPath)) {\n+        throw new NoSuchFileException(\"config file \\\"\" + configPath.toAbsolutePath()\n+            .toString() + \"\\\" is not found.\");\n+      }\n+\n+      try (final FileConfig config = FileConfig.of(configPath)) {\n+        config.load();\n+\n+        log.debug(\"config = {}\", config);\n+\n+        ObjectConverter converter = new ObjectConverter();\n+        converter.toObject(config, this);\n+        resolvePaths();\n+      }\n+    }\n+\n+    private void resolvePaths() {\n+      final Path configDir = getParent(configPath, Paths.get(\".\"));\n+\n+      rootDir = configDir.resolve(rootDir)\n+          .normalize();","path":"src/main/java/jp/kusumotolab/kgenprog/Configuration.java","position":180,"original_position":179,"commit_id":"a8350aef3ddd6e9f6187741a8d2c1acd2528ff05","original_commit_id":"76b397c89a76f4019a91709ed3ff24f9a4d62f48","user":{"login":"a-tanikd","id":8575113,"node_id":"MDQ6VXNlcjg1NzUxMTM=","avatar_url":"https://avatars2.githubusercontent.com/u/8575113?v=4","gravatar_id":"","url":"https://api.github.com/users/a-tanikd","html_url":"https://github.com/a-tanikd","followers_url":"https://api.github.com/users/a-tanikd/followers","following_url":"https://api.github.com/users/a-tanikd/following{/other_user}","gists_url":"https://api.github.com/users/a-tanikd/gists{/gist_id}","starred_url":"https://api.github.com/users/a-tanikd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-tanikd/subscriptions","organizations_url":"https://api.github.com/users/a-tanikd/orgs","repos_url":"https://api.github.com/users/a-tanikd/repos","events_url":"https://api.github.com/users/a-tanikd/events{/privacy}","received_events_url":"https://api.github.com/users/a-tanikd/received_events","type":"User","site_admin":false},"body":"以前，\r\n\r\n> 相対パスで指定されたパラメタは裏でも相対パスで扱うほうが良いと思う．\r\n> https://github.com/kusumotolab/kGenProg/pull/225#issuecomment-410557782\r\n\r\nと指摘されたので，ちょっと抵抗あります．\r\n別 issue に切り出して，みなさんの意見を聞くのはどうでしょう．\r\n","created_at":"2018-10-10T07:27:33Z","updated_at":"2018-10-10T07:27:34Z","html_url":"https://github.com/kusumotolab/kGenProg/pull/348#discussion_r223962890","pull_request_url":"https://api.github.com/repos/kusumotolab/kGenProg/pulls/348","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/kusumotolab/kGenProg/pulls/comments/223962890"},"html":{"href":"https://github.com/kusumotolab/kGenProg/pull/348#discussion_r223962890"},"pull_request":{"href":"https://api.github.com/repos/kusumotolab/kGenProg/pulls/348"}},"in_reply_to_id":223941535},"pull_request":{"url":"https://api.github.com/repos/kusumotolab/kGenProg/pulls/348","id":220713029,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwNzEzMDI5","html_url":"https://github.com/kusumotolab/kGenProg/pull/348","diff_url":"https://github.com/kusumotolab/kGenProg/pull/348.diff","patch_url":"https://github.com/kusumotolab/kGenProg/pull/348.patch","issue_url":"https://api.github.com/repos/kusumotolab/kGenProg/issues/348","number":348,"state":"open","locked":false,"title":"設定ファイル読み込み機能を実装","user":{"login":"a-tanikd","id":8575113,"node_id":"MDQ6VXNlcjg1NzUxMTM=","avatar_url":"https://avatars2.githubusercontent.com/u/8575113?v=4","gravatar_id":"","url":"https://api.github.com/users/a-tanikd","html_url":"https://github.com/a-tanikd","followers_url":"https://api.github.com/users/a-tanikd/followers","following_url":"https://api.github.com/users/a-tanikd/following{/other_user}","gists_url":"https://api.github.com/users/a-tanikd/gists{/gist_id}","starred_url":"https://api.github.com/users/a-tanikd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-tanikd/subscriptions","organizations_url":"https://api.github.com/users/a-tanikd/orgs","repos_url":"https://api.github.com/users/a-tanikd/repos","events_url":"https://api.github.com/users/a-tanikd/events{/privacy}","received_events_url":"https://api.github.com/users/a-tanikd/received_events","type":"User","site_admin":false},"body":"resolve #26 \r\n\r\n### やったこと\r\n- 設定ファイル読み込み処理の実装\r\n- これにともない，`-r`, `-s`, `-t` をオプショナルにした\r\n- オプションが何も指定されなければ，カレントディレクトリの `kgenprog.toml` を読み込むようにした\r\n  - この場合のテストは書けていません\r\n  - テスト実行時にカレントディレクトリを変更する方法が分からなかったため\r\n- 雑多な修正\r\n  - 覚えづらい短縮オプションの削除（`-i`, `-a` 等）\r\n  - `metaVar` （usage で表示されるオプションの引数を表す `<path>` 等の文字列）がいくつかのオプションに設定されていなかったので，それらを追加\r\n  - usage メッセージを変更","created_at":"2018-10-05T14:03:14Z","updated_at":"2018-10-10T07:27:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1679ea678e9bd7a8732807eb6dfb02772065bf05","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/kusumotolab/kGenProg/pulls/348/commits","review_comments_url":"https://api.github.com/repos/kusumotolab/kGenProg/pulls/348/comments","review_comment_url":"https://api.github.com/repos/kusumotolab/kGenProg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kusumotolab/kGenProg/issues/348/comments","statuses_url":"https://api.github.com/repos/kusumotolab/kGenProg/statuses/a8350aef3ddd6e9f6187741a8d2c1acd2528ff05","head":{"label":"kusumotolab:add-feature-to-read-config-file","ref":"add-feature-to-read-config-file","sha":"a8350aef3ddd6e9f6187741a8d2c1acd2528ff05","user":{"login":"kusumotolab","id":3646276,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NDYyNzY=","avatar_url":"https://avatars3.githubusercontent.com/u/3646276?v=4","gravatar_id":"","url":"https://api.github.com/users/kusumotolab","html_url":"https://github.com/kusumotolab","followers_url":"https://api.github.com/users/kusumotolab/followers","following_url":"https://api.github.com/users/kusumotolab/following{/other_user}","gists_url":"https://api.github.com/users/kusumotolab/gists{/gist_id}","starred_url":"https://api.github.com/users/kusumotolab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kusumotolab/subscriptions","organizations_url":"https://api.github.com/users/kusumotolab/orgs","repos_url":"https://api.github.com/users/kusumotolab/repos","events_url":"https://api.github.com/users/kusumotolab/events{/privacy}","received_events_url":"https://api.github.com/users/kusumotolab/received_events","type":"Organization","site_admin":false},"repo":{"id":128753992,"node_id":"MDEwOlJlcG9zaXRvcnkxMjg3NTM5OTI=","name":"kGenProg","full_name":"kusumotolab/kGenProg","private":false,"owner":{"login":"kusumotolab","id":3646276,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NDYyNzY=","avatar_url":"https://avatars3.githubusercontent.com/u/3646276?v=4","gravatar_id":"","url":"https://api.github.com/users/kusumotolab","html_url":"https://github.com/kusumotolab","followers_url":"https://api.github.com/users/kusumotolab/followers","following_url":"https://api.github.com/users/kusumotolab/following{/other_user}","gists_url":"https://api.github.com/users/kusumotolab/gists{/gist_id}","starred_url":"https://api.github.com/users/kusumotolab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kusumotolab/subscriptions","organizations_url":"https://api.github.com/users/kusumotolab/orgs","repos_url":"https://api.github.com/users/kusumotolab/repos","events_url":"https://api.github.com/users/kusumotolab/events{/privacy}","received_events_url":"https://api.github.com/users/kusumotolab/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/kusumotolab/kGenProg","description":"A High-performance, High-extensibility and High-portability APR System","fork":false,"url":"https://api.github.com/repos/kusumotolab/kGenProg","forks_url":"https://api.github.com/repos/kusumotolab/kGenProg/forks","keys_url":"https://api.github.com/repos/kusumotolab/kGenProg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kusumotolab/kGenProg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kusumotolab/kGenProg/teams","hooks_url":"https://api.github.com/repos/kusumotolab/kGenProg/hooks","issue_events_url":"https://api.github.com/repos/kusumotolab/kGenProg/issues/events{/number}","events_url":"https://api.github.com/repos/kusumotolab/kGenProg/events","assignees_url":"https://api.github.com/repos/kusumotolab/kGenProg/assignees{/user}","branches_url":"https://api.github.com/repos/kusumotolab/kGenProg/branches{/branch}","tags_url":"https://api.github.com/repos/kusumotolab/kGenProg/tags","blobs_url":"https://api.github.com/repos/kusumotolab/kGenProg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kusumotolab/kGenProg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kusumotolab/kGenProg/git/refs{/sha}","trees_url":"https://api.github.com/repos/kusumotolab/kGenProg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kusumotolab/kGenProg/statuses/{sha}","languages_url":"https://api.github.com/repos/kusumotolab/kGenProg/languages","stargazers_url":"https://api.github.com/repos/kusumotolab/kGenProg/stargazers","contributors_url":"https://api.github.com/repos/kusumotolab/kGenProg/contributors","subscribers_url":"https://api.github.com/repos/kusumotolab/kGenProg/subscribers","subscription_url":"https://api.github.com/repos/kusumotolab/kGenProg/subscription","commits_url":"https://api.github.com/repos/kusumotolab/kGenProg/commits{/sha}","git_commits_url":"https://api.github.com/repos/kusumotolab/kGenProg/git/commits{/sha}","comments_url":"https://api.github.com/repos/kusumotolab/kGenProg/comments{/number}","issue_comment_url":"https://api.github.com/repos/kusumotolab/kGenProg/issues/comments{/number}","contents_url":"https://api.github.com/repos/kusumotolab/kGenProg/contents/{+path}","compare_url":"https://api.github.com/repos/kusumotolab/kGenProg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kusumotolab/kGenProg/merges","archive_url":"https://api.github.com/repos/kusumotolab/kGenProg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kusumotolab/kGenProg/downloads","issues_url":"https://api.github.com/repos/kusumotolab/kGenProg/issues{/number}","pulls_url":"https://api.github.com/repos/kusumotolab/kGenProg/pulls{/number}","milestones_url":"https://api.github.com/repos/kusumotolab/kGenProg/milestones{/number}","notifications_url":"https://api.github.com/repos/kusumotolab/kGenProg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kusumotolab/kGenProg/labels{/name}","releases_url":"https://api.github.com/repos/kusumotolab/kGenProg/releases{/id}","deployments_url":"https://api.github.com/repos/kusumotolab/kGenProg/deployments","created_at":"2018-04-09T10:21:49Z","updated_at":"2018-10-09T07:58:43Z","pushed_at":"2018-10-10T07:05:18Z","git_url":"git://github.com/kusumotolab/kGenProg.git","ssh_url":"git@github.com:kusumotolab/kGenProg.git","clone_url":"https://github.com/kusumotolab/kGenProg.git","svn_url":"https://github.com/kusumotolab/kGenProg","homepage":"","size":1867,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":42,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":2,"open_issues":42,"watchers":2,"default_branch":"master"}},"base":{"label":"kusumotolab:master","ref":"master","sha":"cf7505631e0947ffcb4e6263d896c93d06118e22","user":{"login":"kusumotolab","id":3646276,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NDYyNzY=","avatar_url":"https://avatars3.githubusercontent.com/u/3646276?v=4","gravatar_id":"","url":"https://api.github.com/users/kusumotolab","html_url":"https://github.com/kusumotolab","followers_url":"https://api.github.com/users/kusumotolab/followers","following_url":"https://api.github.com/users/kusumotolab/following{/other_user}","gists_url":"https://api.github.com/users/kusumotolab/gists{/gist_id}","starred_url":"https://api.github.com/users/kusumotolab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kusumotolab/subscriptions","organizations_url":"https://api.github.com/users/kusumotolab/orgs","repos_url":"https://api.github.com/users/kusumotolab/repos","events_url":"https://api.github.com/users/kusumotolab/events{/privacy}","received_events_url":"https://api.github.com/users/kusumotolab/received_events","type":"Organization","site_admin":false},"repo":{"id":128753992,"node_id":"MDEwOlJlcG9zaXRvcnkxMjg3NTM5OTI=","name":"kGenProg","full_name":"kusumotolab/kGenProg","private":false,"owner":{"login":"kusumotolab","id":3646276,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NDYyNzY=","avatar_url":"https://avatars3.githubusercontent.com/u/3646276?v=4","gravatar_id":"","url":"https://api.github.com/users/kusumotolab","html_url":"https://github.com/kusumotolab","followers_url":"https://api.github.com/users/kusumotolab/followers","following_url":"https://api.github.com/users/kusumotolab/following{/other_user}","gists_url":"https://api.github.com/users/kusumotolab/gists{/gist_id}","starred_url":"https://api.github.com/users/kusumotolab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kusumotolab/subscriptions","organizations_url":"https://api.github.com/users/kusumotolab/orgs","repos_url":"https://api.github.com/users/kusumotolab/repos","events_url":"https://api.github.com/users/kusumotolab/events{/privacy}","received_events_url":"https://api.github.com/users/kusumotolab/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/kusumotolab/kGenProg","description":"A High-performance, High-extensibility and High-portability APR System","fork":false,"url":"https://api.github.com/repos/kusumotolab/kGenProg","forks_url":"https://api.github.com/repos/kusumotolab/kGenProg/forks","keys_url":"https://api.github.com/repos/kusumotolab/kGenProg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kusumotolab/kGenProg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kusumotolab/kGenProg/teams","hooks_url":"https://api.github.com/repos/kusumotolab/kGenProg/hooks","issue_events_url":"https://api.github.com/repos/kusumotolab/kGenProg/issues/events{/number}","events_url":"https://api.github.com/repos/kusumotolab/kGenProg/events","assignees_url":"https://api.github.com/repos/kusumotolab/kGenProg/assignees{/user}","branches_url":"https://api.github.com/repos/kusumotolab/kGenProg/branches{/branch}","tags_url":"https://api.github.com/repos/kusumotolab/kGenProg/tags","blobs_url":"https://api.github.com/repos/kusumotolab/kGenProg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kusumotolab/kGenProg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kusumotolab/kGenProg/git/refs{/sha}","trees_url":"https://api.github.com/repos/kusumotolab/kGenProg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kusumotolab/kGenProg/statuses/{sha}","languages_url":"https://api.github.com/repos/kusumotolab/kGenProg/languages","stargazers_url":"https://api.github.com/repos/kusumotolab/kGenProg/stargazers","contributors_url":"https://api.github.com/repos/kusumotolab/kGenProg/contributors","subscribers_url":"https://api.github.com/repos/kusumotolab/kGenProg/subscribers","subscription_url":"https://api.github.com/repos/kusumotolab/kGenProg/subscription","commits_url":"https://api.github.com/repos/kusumotolab/kGenProg/commits{/sha}","git_commits_url":"https://api.github.com/repos/kusumotolab/kGenProg/git/commits{/sha}","comments_url":"https://api.github.com/repos/kusumotolab/kGenProg/comments{/number}","issue_comment_url":"https://api.github.com/repos/kusumotolab/kGenProg/issues/comments{/number}","contents_url":"https://api.github.com/repos/kusumotolab/kGenProg/contents/{+path}","compare_url":"https://api.github.com/repos/kusumotolab/kGenProg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kusumotolab/kGenProg/merges","archive_url":"https://api.github.com/repos/kusumotolab/kGenProg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kusumotolab/kGenProg/downloads","issues_url":"https://api.github.com/repos/kusumotolab/kGenProg/issues{/number}","pulls_url":"https://api.github.com/repos/kusumotolab/kGenProg/pulls{/number}","milestones_url":"https://api.github.com/repos/kusumotolab/kGenProg/milestones{/number}","notifications_url":"https://api.github.com/repos/kusumotolab/kGenProg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kusumotolab/kGenProg/labels{/name}","releases_url":"https://api.github.com/repos/kusumotolab/kGenProg/releases{/id}","deployments_url":"https://api.github.com/repos/kusumotolab/kGenProg/deployments","created_at":"2018-04-09T10:21:49Z","updated_at":"2018-10-09T07:58:43Z","pushed_at":"2018-10-10T07:05:18Z","git_url":"git://github.com/kusumotolab/kGenProg.git","ssh_url":"git@github.com:kusumotolab/kGenProg.git","clone_url":"https://github.com/kusumotolab/kGenProg.git","svn_url":"https://github.com/kusumotolab/kGenProg","homepage":"","size":1867,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":42,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":2,"open_issues":42,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kusumotolab/kGenProg/pulls/348"},"html":{"href":"https://github.com/kusumotolab/kGenProg/pull/348"},"issue":{"href":"https://api.github.com/repos/kusumotolab/kGenProg/issues/348"},"comments":{"href":"https://api.github.com/repos/kusumotolab/kGenProg/issues/348/comments"},"review_comments":{"href":"https://api.github.com/repos/kusumotolab/kGenProg/pulls/348/comments"},"review_comment":{"href":"https://api.github.com/repos/kusumotolab/kGenProg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kusumotolab/kGenProg/pulls/348/commits"},"statuses":{"href":"https://api.github.com/repos/kusumotolab/kGenProg/statuses/a8350aef3ddd6e9f6187741a8d2c1acd2528ff05"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"a-tanikd"}}