{"action":"created","comment":{"url":"https://api.github.com/repos/dart-lang/linter/pulls/comments/32578006","id":32578006,"diff_hunk":"@@ -4,11 +4,51 @@\n \n library linter.src.config;\n \n+import 'package:analyzer/plugin/options.dart';\n import 'package:yaml/yaml.dart';\n \n+/// Process the given option [fileContents] and produce a corresponding\n+/// [LintConfig].\n+LintConfig processAnalysisOptionsFile(String fileContents, {String fileUrl}) {\n+  var yaml = loadYamlNode(fileContents, sourceUrl: fileUrl);\n+  if (yaml is YamlMap) {\n+    return _parseConfig(yaml);\n+  }\n+  return null;\n+}\n+\n+LintConfig _parseConfig(Map optionsMap) {\n+  if (optionsMap != null) {\n+    var options = optionsMap['linter'];","path":"lib/src/config.dart","position":19,"original_position":19,"commit_id":"14d1ab2ab468b7b0504c5c731dc72603ba4c811e","original_commit_id":"14d1ab2ab468b7b0504c5c731dc72603ba4c811e","user":{"login":"bwilkerson","id":5840555,"avatar_url":"https://avatars.githubusercontent.com/u/5840555?v=3","gravatar_id":"","url":"https://api.github.com/users/bwilkerson","html_url":"https://github.com/bwilkerson","followers_url":"https://api.github.com/users/bwilkerson/followers","following_url":"https://api.github.com/users/bwilkerson/following{/other_user}","gists_url":"https://api.github.com/users/bwilkerson/gists{/gist_id}","starred_url":"https://api.github.com/users/bwilkerson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwilkerson/subscriptions","organizations_url":"https://api.github.com/users/bwilkerson/orgs","repos_url":"https://api.github.com/users/bwilkerson/repos","events_url":"https://api.github.com/users/bwilkerson/events{/privacy}","received_events_url":"https://api.github.com/users/bwilkerson/received_events","type":"User","site_admin":false},"body":"We might want to encourage (and use) a convention of fully qualified top-level names, such as 'org.dartlang.linter'.","created_at":"2015-06-16T22:19:30Z","updated_at":"2015-06-16T22:19:30Z","html_url":"https://github.com/dart-lang/linter/pull/105#discussion_r32578006","pull_request_url":"https://api.github.com/repos/dart-lang/linter/pulls/105","_links":{"self":{"href":"https://api.github.com/repos/dart-lang/linter/pulls/comments/32578006"},"html":{"href":"https://github.com/dart-lang/linter/pull/105#discussion_r32578006"},"pull_request":{"href":"https://api.github.com/repos/dart-lang/linter/pulls/105"}}},"pull_request":{"url":"https://api.github.com/repos/dart-lang/linter/pulls/105","id":37844761,"html_url":"https://github.com/dart-lang/linter/pull/105","diff_url":"https://github.com/dart-lang/linter/pull/105.diff","patch_url":"https://github.com/dart-lang/linter/pull/105.patch","issue_url":"https://api.github.com/repos/dart-lang/linter/issues/105","number":105,"state":"open","locked":false,"title":"Analysis options integration.","user":{"login":"pq","id":67586,"avatar_url":"https://avatars.githubusercontent.com/u/67586?v=3","gravatar_id":"","url":"https://api.github.com/users/pq","html_url":"https://github.com/pq","followers_url":"https://api.github.com/users/pq/followers","following_url":"https://api.github.com/users/pq/following{/other_user}","gists_url":"https://api.github.com/users/pq/gists{/gist_id}","starred_url":"https://api.github.com/users/pq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pq/subscriptions","organizations_url":"https://api.github.com/users/pq/orgs","repos_url":"https://api.github.com/users/pq/repos","events_url":"https://api.github.com/users/pq/events{/privacy}","received_events_url":"https://api.github.com/users/pq/received_events","type":"User","site_admin":false},"body":"This integrates the linter with the analyzer's options mechanism.","created_at":"2015-06-16T21:40:25Z","updated_at":"2015-06-16T22:19:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"56b0bd75d233053c0533998512a37be401869998","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dart-lang/linter/pulls/105/commits","review_comments_url":"https://api.github.com/repos/dart-lang/linter/pulls/105/comments","review_comment_url":"https://api.github.com/repos/dart-lang/linter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dart-lang/linter/issues/105/comments","statuses_url":"https://api.github.com/repos/dart-lang/linter/statuses/14d1ab2ab468b7b0504c5c731dc72603ba4c811e","head":{"label":"dart-lang:options_proc","ref":"options_proc","sha":"14d1ab2ab468b7b0504c5c731dc72603ba4c811e","user":{"login":"dart-lang","id":1609975,"avatar_url":"https://avatars.githubusercontent.com/u/1609975?v=3","gravatar_id":"","url":"https://api.github.com/users/dart-lang","html_url":"https://github.com/dart-lang","followers_url":"https://api.github.com/users/dart-lang/followers","following_url":"https://api.github.com/users/dart-lang/following{/other_user}","gists_url":"https://api.github.com/users/dart-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/dart-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dart-lang/subscriptions","organizations_url":"https://api.github.com/users/dart-lang/orgs","repos_url":"https://api.github.com/users/dart-lang/repos","events_url":"https://api.github.com/users/dart-lang/events{/privacy}","received_events_url":"https://api.github.com/users/dart-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":29209166,"name":"linter","full_name":"dart-lang/linter","owner":{"login":"dart-lang","id":1609975,"avatar_url":"https://avatars.githubusercontent.com/u/1609975?v=3","gravatar_id":"","url":"https://api.github.com/users/dart-lang","html_url":"https://github.com/dart-lang","followers_url":"https://api.github.com/users/dart-lang/followers","following_url":"https://api.github.com/users/dart-lang/following{/other_user}","gists_url":"https://api.github.com/users/dart-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/dart-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dart-lang/subscriptions","organizations_url":"https://api.github.com/users/dart-lang/orgs","repos_url":"https://api.github.com/users/dart-lang/repos","events_url":"https://api.github.com/users/dart-lang/events{/privacy}","received_events_url":"https://api.github.com/users/dart-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dart-lang/linter","description":"Style linter for Dart.","fork":false,"url":"https://api.github.com/repos/dart-lang/linter","forks_url":"https://api.github.com/repos/dart-lang/linter/forks","keys_url":"https://api.github.com/repos/dart-lang/linter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dart-lang/linter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dart-lang/linter/teams","hooks_url":"https://api.github.com/repos/dart-lang/linter/hooks","issue_events_url":"https://api.github.com/repos/dart-lang/linter/issues/events{/number}","events_url":"https://api.github.com/repos/dart-lang/linter/events","assignees_url":"https://api.github.com/repos/dart-lang/linter/assignees{/user}","branches_url":"https://api.github.com/repos/dart-lang/linter/branches{/branch}","tags_url":"https://api.github.com/repos/dart-lang/linter/tags","blobs_url":"https://api.github.com/repos/dart-lang/linter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dart-lang/linter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dart-lang/linter/git/refs{/sha}","trees_url":"https://api.github.com/repos/dart-lang/linter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dart-lang/linter/statuses/{sha}","languages_url":"https://api.github.com/repos/dart-lang/linter/languages","stargazers_url":"https://api.github.com/repos/dart-lang/linter/stargazers","contributors_url":"https://api.github.com/repos/dart-lang/linter/contributors","subscribers_url":"https://api.github.com/repos/dart-lang/linter/subscribers","subscription_url":"https://api.github.com/repos/dart-lang/linter/subscription","commits_url":"https://api.github.com/repos/dart-lang/linter/commits{/sha}","git_commits_url":"https://api.github.com/repos/dart-lang/linter/git/commits{/sha}","comments_url":"https://api.github.com/repos/dart-lang/linter/comments{/number}","issue_comment_url":"https://api.github.com/repos/dart-lang/linter/issues/comments{/number}","contents_url":"https://api.github.com/repos/dart-lang/linter/contents/{+path}","compare_url":"https://api.github.com/repos/dart-lang/linter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dart-lang/linter/merges","archive_url":"https://api.github.com/repos/dart-lang/linter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dart-lang/linter/downloads","issues_url":"https://api.github.com/repos/dart-lang/linter/issues{/number}","pulls_url":"https://api.github.com/repos/dart-lang/linter/pulls{/number}","milestones_url":"https://api.github.com/repos/dart-lang/linter/milestones{/number}","notifications_url":"https://api.github.com/repos/dart-lang/linter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dart-lang/linter/labels{/name}","releases_url":"https://api.github.com/repos/dart-lang/linter/releases{/id}","created_at":"2015-01-13T20:21:11Z","updated_at":"2015-06-09T05:12:25Z","pushed_at":"2015-06-16T21:40:25Z","git_url":"git://github.com/dart-lang/linter.git","ssh_url":"git@github.com:dart-lang/linter.git","clone_url":"https://github.com/dart-lang/linter.git","svn_url":"https://github.com/dart-lang/linter","homepage":"http://dart-lang.github.io/linter/","size":1076,"stargazers_count":23,"watchers_count":23,"language":"Dart","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":44,"forks":4,"open_issues":44,"watchers":23,"default_branch":"master"}},"base":{"label":"dart-lang:master","ref":"master","sha":"0b139772f171330f89ed7f6f0a93ddd5b615b642","user":{"login":"dart-lang","id":1609975,"avatar_url":"https://avatars.githubusercontent.com/u/1609975?v=3","gravatar_id":"","url":"https://api.github.com/users/dart-lang","html_url":"https://github.com/dart-lang","followers_url":"https://api.github.com/users/dart-lang/followers","following_url":"https://api.github.com/users/dart-lang/following{/other_user}","gists_url":"https://api.github.com/users/dart-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/dart-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dart-lang/subscriptions","organizations_url":"https://api.github.com/users/dart-lang/orgs","repos_url":"https://api.github.com/users/dart-lang/repos","events_url":"https://api.github.com/users/dart-lang/events{/privacy}","received_events_url":"https://api.github.com/users/dart-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":29209166,"name":"linter","full_name":"dart-lang/linter","owner":{"login":"dart-lang","id":1609975,"avatar_url":"https://avatars.githubusercontent.com/u/1609975?v=3","gravatar_id":"","url":"https://api.github.com/users/dart-lang","html_url":"https://github.com/dart-lang","followers_url":"https://api.github.com/users/dart-lang/followers","following_url":"https://api.github.com/users/dart-lang/following{/other_user}","gists_url":"https://api.github.com/users/dart-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/dart-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dart-lang/subscriptions","organizations_url":"https://api.github.com/users/dart-lang/orgs","repos_url":"https://api.github.com/users/dart-lang/repos","events_url":"https://api.github.com/users/dart-lang/events{/privacy}","received_events_url":"https://api.github.com/users/dart-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dart-lang/linter","description":"Style linter for Dart.","fork":false,"url":"https://api.github.com/repos/dart-lang/linter","forks_url":"https://api.github.com/repos/dart-lang/linter/forks","keys_url":"https://api.github.com/repos/dart-lang/linter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dart-lang/linter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dart-lang/linter/teams","hooks_url":"https://api.github.com/repos/dart-lang/linter/hooks","issue_events_url":"https://api.github.com/repos/dart-lang/linter/issues/events{/number}","events_url":"https://api.github.com/repos/dart-lang/linter/events","assignees_url":"https://api.github.com/repos/dart-lang/linter/assignees{/user}","branches_url":"https://api.github.com/repos/dart-lang/linter/branches{/branch}","tags_url":"https://api.github.com/repos/dart-lang/linter/tags","blobs_url":"https://api.github.com/repos/dart-lang/linter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dart-lang/linter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dart-lang/linter/git/refs{/sha}","trees_url":"https://api.github.com/repos/dart-lang/linter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dart-lang/linter/statuses/{sha}","languages_url":"https://api.github.com/repos/dart-lang/linter/languages","stargazers_url":"https://api.github.com/repos/dart-lang/linter/stargazers","contributors_url":"https://api.github.com/repos/dart-lang/linter/contributors","subscribers_url":"https://api.github.com/repos/dart-lang/linter/subscribers","subscription_url":"https://api.github.com/repos/dart-lang/linter/subscription","commits_url":"https://api.github.com/repos/dart-lang/linter/commits{/sha}","git_commits_url":"https://api.github.com/repos/dart-lang/linter/git/commits{/sha}","comments_url":"https://api.github.com/repos/dart-lang/linter/comments{/number}","issue_comment_url":"https://api.github.com/repos/dart-lang/linter/issues/comments{/number}","contents_url":"https://api.github.com/repos/dart-lang/linter/contents/{+path}","compare_url":"https://api.github.com/repos/dart-lang/linter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dart-lang/linter/merges","archive_url":"https://api.github.com/repos/dart-lang/linter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dart-lang/linter/downloads","issues_url":"https://api.github.com/repos/dart-lang/linter/issues{/number}","pulls_url":"https://api.github.com/repos/dart-lang/linter/pulls{/number}","milestones_url":"https://api.github.com/repos/dart-lang/linter/milestones{/number}","notifications_url":"https://api.github.com/repos/dart-lang/linter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dart-lang/linter/labels{/name}","releases_url":"https://api.github.com/repos/dart-lang/linter/releases{/id}","created_at":"2015-01-13T20:21:11Z","updated_at":"2015-06-09T05:12:25Z","pushed_at":"2015-06-16T21:40:25Z","git_url":"git://github.com/dart-lang/linter.git","ssh_url":"git@github.com:dart-lang/linter.git","clone_url":"https://github.com/dart-lang/linter.git","svn_url":"https://github.com/dart-lang/linter","homepage":"http://dart-lang.github.io/linter/","size":1076,"stargazers_count":23,"watchers_count":23,"language":"Dart","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":44,"forks":4,"open_issues":44,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dart-lang/linter/pulls/105"},"html":{"href":"https://github.com/dart-lang/linter/pull/105"},"issue":{"href":"https://api.github.com/repos/dart-lang/linter/issues/105"},"comments":{"href":"https://api.github.com/repos/dart-lang/linter/issues/105/comments"},"review_comments":{"href":"https://api.github.com/repos/dart-lang/linter/pulls/105/comments"},"review_comment":{"href":"https://api.github.com/repos/dart-lang/linter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dart-lang/linter/pulls/105/commits"},"statuses":{"href":"https://api.github.com/repos/dart-lang/linter/statuses/14d1ab2ab468b7b0504c5c731dc72603ba4c811e"}}}}