{"action":"created","comment":{"url":"https://api.github.com/repos/servo/servo/pulls/comments/75572579","id":75572579,"diff_hunk":"@@ -694,6 +664,81 @@ def check_spec(file_name, lines):\n                 brace_count -= 1\n \n \n+def check_config_file(config_file, print_text=True):\n+    # Load configs from servo-tidy.toml\n+    if os.path.exists(config_file):\n+        with open(config_file) as content:\n+            conf_file = content.read()\n+            lines = conf_file.splitlines(True)\n+    else:\n+        print(\"%s config file is required but was not found\" % config_file)\n+        sys.exit(1)","path":"python/tidy/servo_tidy/tidy.py","position":147,"original_position":147,"commit_id":"d27d927a3ba3aaea62593147396bc8baa45d6594","original_commit_id":"d27d927a3ba3aaea62593147396bc8baa45d6594","user":{"login":"Wafflespeanut","id":6691262,"avatar_url":"https://avatars.githubusercontent.com/u/6691262?v=3","gravatar_id":"","url":"https://api.github.com/users/Wafflespeanut","html_url":"https://github.com/Wafflespeanut","followers_url":"https://api.github.com/users/Wafflespeanut/followers","following_url":"https://api.github.com/users/Wafflespeanut/following{/other_user}","gists_url":"https://api.github.com/users/Wafflespeanut/gists{/gist_id}","starred_url":"https://api.github.com/users/Wafflespeanut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wafflespeanut/subscriptions","organizations_url":"https://api.github.com/users/Wafflespeanut/orgs","repos_url":"https://api.github.com/users/Wafflespeanut/repos","events_url":"https://api.github.com/users/Wafflespeanut/events{/privacy}","received_events_url":"https://api.github.com/users/Wafflespeanut/received_events","type":"User","site_admin":false},"body":"could be just,\r\n``` python\r\nif not os.path.exists(...):\r\n    print(\"not found blah blah\")\r\n    sys.exit(1)\r\n```\r\n\r\n... so that we can isolate this check from everything else, and proceed with opening the file.","created_at":"2016-08-20T04:35:41Z","updated_at":"2016-08-20T04:35:41Z","html_url":"https://github.com/servo/servo/pull/12877#discussion_r75572579","pull_request_url":"https://api.github.com/repos/servo/servo/pulls/12877","_links":{"self":{"href":"https://api.github.com/repos/servo/servo/pulls/comments/75572579"},"html":{"href":"https://github.com/servo/servo/pull/12877#discussion_r75572579"},"pull_request":{"href":"https://api.github.com/repos/servo/servo/pulls/12877"}}},"pull_request":{"url":"https://api.github.com/repos/servo/servo/pulls/12877","id":81319981,"html_url":"https://github.com/servo/servo/pull/12877","diff_url":"https://github.com/servo/servo/pull/12877.diff","patch_url":"https://github.com/servo/servo/pull/12877.patch","issue_url":"https://api.github.com/repos/servo/servo/issues/12877","number":12877,"state":"open","locked":false,"title":"WIP: Tidy config file","user":{"login":"UK992","id":1530353,"avatar_url":"https://avatars.githubusercontent.com/u/1530353?v=3","gravatar_id":"","url":"https://api.github.com/users/UK992","html_url":"https://github.com/UK992","followers_url":"https://api.github.com/users/UK992/followers","following_url":"https://api.github.com/users/UK992/following{/other_user}","gists_url":"https://api.github.com/users/UK992/gists{/gist_id}","starred_url":"https://api.github.com/users/UK992/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UK992/subscriptions","organizations_url":"https://api.github.com/users/UK992/orgs","repos_url":"https://api.github.com/users/UK992/repos","events_url":"https://api.github.com/users/UK992/events{/privacy}","received_events_url":"https://api.github.com/users/UK992/received_events","type":"User","site_admin":false},"body":"This is wip workaround for https://github.com/servo/servo/issues/10841\r\nAdds ``servo-tidy.toml`` with configs and ignored dirs, files and packages.\r\nThis will allow to set custom configuration per repo.\r\nIt's an example how could config file looks like.\r\nI want opinion on that, if this is right approaches and how to improve it.\r\n\r\ncc @edunham\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/servo/servo/12877)\n<!-- Reviewable:end -->\n","created_at":"2016-08-15T14:33:55Z","updated_at":"2016-08-20T04:35:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7451a58684de9a2d32babf5544effa282b1c1985","assignee":{"login":"Wafflespeanut","id":6691262,"avatar_url":"https://avatars.githubusercontent.com/u/6691262?v=3","gravatar_id":"","url":"https://api.github.com/users/Wafflespeanut","html_url":"https://github.com/Wafflespeanut","followers_url":"https://api.github.com/users/Wafflespeanut/followers","following_url":"https://api.github.com/users/Wafflespeanut/following{/other_user}","gists_url":"https://api.github.com/users/Wafflespeanut/gists{/gist_id}","starred_url":"https://api.github.com/users/Wafflespeanut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wafflespeanut/subscriptions","organizations_url":"https://api.github.com/users/Wafflespeanut/orgs","repos_url":"https://api.github.com/users/Wafflespeanut/repos","events_url":"https://api.github.com/users/Wafflespeanut/events{/privacy}","received_events_url":"https://api.github.com/users/Wafflespeanut/received_events","type":"User","site_admin":false},"assignees":[{"login":"Wafflespeanut","id":6691262,"avatar_url":"https://avatars.githubusercontent.com/u/6691262?v=3","gravatar_id":"","url":"https://api.github.com/users/Wafflespeanut","html_url":"https://github.com/Wafflespeanut","followers_url":"https://api.github.com/users/Wafflespeanut/followers","following_url":"https://api.github.com/users/Wafflespeanut/following{/other_user}","gists_url":"https://api.github.com/users/Wafflespeanut/gists{/gist_id}","starred_url":"https://api.github.com/users/Wafflespeanut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wafflespeanut/subscriptions","organizations_url":"https://api.github.com/users/Wafflespeanut/orgs","repos_url":"https://api.github.com/users/Wafflespeanut/repos","events_url":"https://api.github.com/users/Wafflespeanut/events{/privacy}","received_events_url":"https://api.github.com/users/Wafflespeanut/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/servo/servo/pulls/12877/commits","review_comments_url":"https://api.github.com/repos/servo/servo/pulls/12877/comments","review_comment_url":"https://api.github.com/repos/servo/servo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/servo/servo/issues/12877/comments","statuses_url":"https://api.github.com/repos/servo/servo/statuses/d27d927a3ba3aaea62593147396bc8baa45d6594","head":{"label":"UK992:tidy-toml","ref":"tidy-toml","sha":"d27d927a3ba3aaea62593147396bc8baa45d6594","user":{"login":"UK992","id":1530353,"avatar_url":"https://avatars.githubusercontent.com/u/1530353?v=3","gravatar_id":"","url":"https://api.github.com/users/UK992","html_url":"https://github.com/UK992","followers_url":"https://api.github.com/users/UK992/followers","following_url":"https://api.github.com/users/UK992/following{/other_user}","gists_url":"https://api.github.com/users/UK992/gists{/gist_id}","starred_url":"https://api.github.com/users/UK992/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UK992/subscriptions","organizations_url":"https://api.github.com/users/UK992/orgs","repos_url":"https://api.github.com/users/UK992/repos","events_url":"https://api.github.com/users/UK992/events{/privacy}","received_events_url":"https://api.github.com/users/UK992/received_events","type":"User","site_admin":false},"repo":{"id":50867465,"name":"servo","full_name":"UK992/servo","owner":{"login":"UK992","id":1530353,"avatar_url":"https://avatars.githubusercontent.com/u/1530353?v=3","gravatar_id":"","url":"https://api.github.com/users/UK992","html_url":"https://github.com/UK992","followers_url":"https://api.github.com/users/UK992/followers","following_url":"https://api.github.com/users/UK992/following{/other_user}","gists_url":"https://api.github.com/users/UK992/gists{/gist_id}","starred_url":"https://api.github.com/users/UK992/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UK992/subscriptions","organizations_url":"https://api.github.com/users/UK992/orgs","repos_url":"https://api.github.com/users/UK992/repos","events_url":"https://api.github.com/users/UK992/events{/privacy}","received_events_url":"https://api.github.com/users/UK992/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/UK992/servo","description":"The Servo Browser Engine","fork":true,"url":"https://api.github.com/repos/UK992/servo","forks_url":"https://api.github.com/repos/UK992/servo/forks","keys_url":"https://api.github.com/repos/UK992/servo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UK992/servo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UK992/servo/teams","hooks_url":"https://api.github.com/repos/UK992/servo/hooks","issue_events_url":"https://api.github.com/repos/UK992/servo/issues/events{/number}","events_url":"https://api.github.com/repos/UK992/servo/events","assignees_url":"https://api.github.com/repos/UK992/servo/assignees{/user}","branches_url":"https://api.github.com/repos/UK992/servo/branches{/branch}","tags_url":"https://api.github.com/repos/UK992/servo/tags","blobs_url":"https://api.github.com/repos/UK992/servo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UK992/servo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UK992/servo/git/refs{/sha}","trees_url":"https://api.github.com/repos/UK992/servo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UK992/servo/statuses/{sha}","languages_url":"https://api.github.com/repos/UK992/servo/languages","stargazers_url":"https://api.github.com/repos/UK992/servo/stargazers","contributors_url":"https://api.github.com/repos/UK992/servo/contributors","subscribers_url":"https://api.github.com/repos/UK992/servo/subscribers","subscription_url":"https://api.github.com/repos/UK992/servo/subscription","commits_url":"https://api.github.com/repos/UK992/servo/commits{/sha}","git_commits_url":"https://api.github.com/repos/UK992/servo/git/commits{/sha}","comments_url":"https://api.github.com/repos/UK992/servo/comments{/number}","issue_comment_url":"https://api.github.com/repos/UK992/servo/issues/comments{/number}","contents_url":"https://api.github.com/repos/UK992/servo/contents/{+path}","compare_url":"https://api.github.com/repos/UK992/servo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UK992/servo/merges","archive_url":"https://api.github.com/repos/UK992/servo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UK992/servo/downloads","issues_url":"https://api.github.com/repos/UK992/servo/issues{/number}","pulls_url":"https://api.github.com/repos/UK992/servo/pulls{/number}","milestones_url":"https://api.github.com/repos/UK992/servo/milestones{/number}","notifications_url":"https://api.github.com/repos/UK992/servo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UK992/servo/labels{/name}","releases_url":"https://api.github.com/repos/UK992/servo/releases{/id}","deployments_url":"https://api.github.com/repos/UK992/servo/deployments","created_at":"2016-02-01T20:08:04Z","updated_at":"2016-02-01T17:29:26Z","pushed_at":"2016-08-19T12:01:42Z","git_url":"git://github.com/UK992/servo.git","ssh_url":"git@github.com:UK992/servo.git","clone_url":"https://github.com/UK992/servo.git","svn_url":"https://github.com/UK992/servo","homepage":"https://servo.org/","size":201607,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"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":"servo:master","ref":"master","sha":"ec53136863f20b80caf165d2f15e8a77d614536e","user":{"login":"servo","id":2566135,"avatar_url":"https://avatars.githubusercontent.com/u/2566135?v=3","gravatar_id":"","url":"https://api.github.com/users/servo","html_url":"https://github.com/servo","followers_url":"https://api.github.com/users/servo/followers","following_url":"https://api.github.com/users/servo/following{/other_user}","gists_url":"https://api.github.com/users/servo/gists{/gist_id}","starred_url":"https://api.github.com/users/servo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servo/subscriptions","organizations_url":"https://api.github.com/users/servo/orgs","repos_url":"https://api.github.com/users/servo/repos","events_url":"https://api.github.com/users/servo/events{/privacy}","received_events_url":"https://api.github.com/users/servo/received_events","type":"Organization","site_admin":false},"repo":{"id":3390243,"name":"servo","full_name":"servo/servo","owner":{"login":"servo","id":2566135,"avatar_url":"https://avatars.githubusercontent.com/u/2566135?v=3","gravatar_id":"","url":"https://api.github.com/users/servo","html_url":"https://github.com/servo","followers_url":"https://api.github.com/users/servo/followers","following_url":"https://api.github.com/users/servo/following{/other_user}","gists_url":"https://api.github.com/users/servo/gists{/gist_id}","starred_url":"https://api.github.com/users/servo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servo/subscriptions","organizations_url":"https://api.github.com/users/servo/orgs","repos_url":"https://api.github.com/users/servo/repos","events_url":"https://api.github.com/users/servo/events{/privacy}","received_events_url":"https://api.github.com/users/servo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/servo/servo","description":"The Servo Browser Engine","fork":false,"url":"https://api.github.com/repos/servo/servo","forks_url":"https://api.github.com/repos/servo/servo/forks","keys_url":"https://api.github.com/repos/servo/servo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/servo/servo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/servo/servo/teams","hooks_url":"https://api.github.com/repos/servo/servo/hooks","issue_events_url":"https://api.github.com/repos/servo/servo/issues/events{/number}","events_url":"https://api.github.com/repos/servo/servo/events","assignees_url":"https://api.github.com/repos/servo/servo/assignees{/user}","branches_url":"https://api.github.com/repos/servo/servo/branches{/branch}","tags_url":"https://api.github.com/repos/servo/servo/tags","blobs_url":"https://api.github.com/repos/servo/servo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/servo/servo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/servo/servo/git/refs{/sha}","trees_url":"https://api.github.com/repos/servo/servo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/servo/servo/statuses/{sha}","languages_url":"https://api.github.com/repos/servo/servo/languages","stargazers_url":"https://api.github.com/repos/servo/servo/stargazers","contributors_url":"https://api.github.com/repos/servo/servo/contributors","subscribers_url":"https://api.github.com/repos/servo/servo/subscribers","subscription_url":"https://api.github.com/repos/servo/servo/subscription","commits_url":"https://api.github.com/repos/servo/servo/commits{/sha}","git_commits_url":"https://api.github.com/repos/servo/servo/git/commits{/sha}","comments_url":"https://api.github.com/repos/servo/servo/comments{/number}","issue_comment_url":"https://api.github.com/repos/servo/servo/issues/comments{/number}","contents_url":"https://api.github.com/repos/servo/servo/contents/{+path}","compare_url":"https://api.github.com/repos/servo/servo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/servo/servo/merges","archive_url":"https://api.github.com/repos/servo/servo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/servo/servo/downloads","issues_url":"https://api.github.com/repos/servo/servo/issues{/number}","pulls_url":"https://api.github.com/repos/servo/servo/pulls{/number}","milestones_url":"https://api.github.com/repos/servo/servo/milestones{/number}","notifications_url":"https://api.github.com/repos/servo/servo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/servo/servo/labels{/name}","releases_url":"https://api.github.com/repos/servo/servo/releases{/id}","deployments_url":"https://api.github.com/repos/servo/servo/deployments","created_at":"2012-02-08T19:07:25Z","updated_at":"2016-08-19T17:44:25Z","pushed_at":"2016-08-20T04:10:51Z","git_url":"git://github.com/servo/servo.git","ssh_url":"git@github.com:servo/servo.git","clone_url":"https://github.com/servo/servo.git","svn_url":"https://github.com/servo/servo","homepage":"https://servo.org/","size":290760,"stargazers_count":7761,"watchers_count":7761,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1245,"mirror_url":null,"open_issues_count":1703,"forks":1245,"open_issues":1703,"watchers":7761,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/servo/servo/pulls/12877"},"html":{"href":"https://github.com/servo/servo/pull/12877"},"issue":{"href":"https://api.github.com/repos/servo/servo/issues/12877"},"comments":{"href":"https://api.github.com/repos/servo/servo/issues/12877/comments"},"review_comments":{"href":"https://api.github.com/repos/servo/servo/pulls/12877/comments"},"review_comment":{"href":"https://api.github.com/repos/servo/servo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/servo/servo/pulls/12877/commits"},"statuses":{"href":"https://api.github.com/repos/servo/servo/statuses/d27d927a3ba3aaea62593147396bc8baa45d6594"}}}}
{"actor":{"display_login":"Wafflespeanut"}}