{"action":"created","issue":{"url":"https://api.github.com/repos/flutter/website/issues/968","repository_url":"https://api.github.com/repos/flutter/website","labels_url":"https://api.github.com/repos/flutter/website/issues/968/labels{/name}","comments_url":"https://api.github.com/repos/flutter/website/issues/968/comments","events_url":"https://api.github.com/repos/flutter/website/issues/968/events","html_url":"https://github.com/flutter/website/pull/968","id":315953806,"number":968,"title":"Reenable proper .md snippet extraction, fix analysis errors in cookbook","user":{"login":"brianegan","id":126604,"avatar_url":"https://avatars2.githubusercontent.com/u/126604?v=4","gravatar_id":"","url":"https://api.github.com/users/brianegan","html_url":"https://github.com/brianegan","followers_url":"https://api.github.com/users/brianegan/followers","following_url":"https://api.github.com/users/brianegan/following{/other_user}","gists_url":"https://api.github.com/users/brianegan/gists{/gist_id}","starred_url":"https://api.github.com/users/brianegan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianegan/subscriptions","organizations_url":"https://api.github.com/users/brianegan/orgs","repos_url":"https://api.github.com/users/brianegan/repos","events_url":"https://api.github.com/users/brianegan/events{/privacy}","received_events_url":"https://api.github.com/users/brianegan/received_events","type":"User","site_admin":false},"labels":[{"id":487495822,"url":"https://api.github.com/repos/flutter/website/labels/cla:%20yes","name":"cla: yes","color":"0e8a16","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-19T16:35:36Z","updated_at":"2018-04-27T10:05:21Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/flutter/website/pulls/968","html_url":"https://github.com/flutter/website/pull/968","diff_url":"https://github.com/flutter/website/pull/968.diff","patch_url":"https://github.com/flutter/website/pull/968.patch"},"body":"Hey hey :) I played around with a couple techniques for fixing the cookbook analysis errors and went with the following strategy:\r\n\r\n  - Skip sections that are meant for human consumption: In order to keep the snippets short and focused, many snippets cannot be analyzed. \r\n  - \"Complete examples\" are analyzed for correctness. In most cases, this should capture analysis errors that are relevant, since the snippets of a recipe and the corresponding complete examples should be kept in sync.\r\n\r\nAlternative techniques attempted or discussed:\r\n\r\n  - Group the snippets together for analysis: I tried this but realized it wouldn't quite work. Why? Some snippets are really \"out of context.\" I.e. we have the code for a `new RaisedButton`, but do not place it inside the `build` method of a `State` class for brevity and focus.\r\n  - Ignore some code before the snippet. We could attempt this, but it would mean repeating the complete example for each snippet, revealing only the part of the snippet that's relevant. That felt cumbersome, but happy to go this route if it's preferred. Right now, it appears you can only include some code before a snippet, rather than \"around\" a snippet, so we'd need to write that functionality as well.\r\n\r\nThis is a fix for https://github.com/flutter/flutter/issues/16155\r\n\r\n## Update\r\n\r\n  - After analysis passed, I saw formatting errors in various files throughout the codebase. These are now fixed.\r\n  - I decided to ignore the project's README.md file, as it contains code that could not be properly analyzed (it contains dart codeblocks within  another codeblock, and the extraction tool was unable to process this)"},"comment":{"url":"https://api.github.com/repos/flutter/website/issues/comments/384926649","html_url":"https://github.com/flutter/website/pull/968#issuecomment-384926649","issue_url":"https://api.github.com/repos/flutter/website/issues/968","id":384926649,"user":{"login":"brianegan","id":126604,"avatar_url":"https://avatars2.githubusercontent.com/u/126604?v=4","gravatar_id":"","url":"https://api.github.com/users/brianegan","html_url":"https://github.com/brianegan","followers_url":"https://api.github.com/users/brianegan/followers","following_url":"https://api.github.com/users/brianegan/following{/other_user}","gists_url":"https://api.github.com/users/brianegan/gists{/gist_id}","starred_url":"https://api.github.com/users/brianegan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianegan/subscriptions","organizations_url":"https://api.github.com/users/brianegan/orgs","repos_url":"https://api.github.com/users/brianegan/repos","events_url":"https://api.github.com/users/brianegan/events{/privacy}","received_events_url":"https://api.github.com/users/brianegan/received_events","type":"User","site_admin":false},"created_at":"2018-04-27T10:05:21Z","updated_at":"2018-04-27T10:05:21Z","author_association":"CONTRIBUTOR","body":"Thanks for the review, @goderbauer. Agreed, keeping them in sync would be the best case scenario. I tried all suggestions mentioned in the original issue as well as a few of my own ideas, but this was simply the best that I could come up with. Do you have any alternative suggestions that might do the trick? "}}
{"actor":{"display_login":"brianegan"}}