Commit Graph

7 Commits

Author SHA1 Message Date
Greg Spencer
10e4b04010
Switch document generation to use the snippets package (#87231)
Switch document generation to use the snippets package instead of the snippets code in the Flutter repo. In the process, some bugs in sample code analysis have been fixed, and I've fixed some more errors in the samples.

This will allow the snippets package to be developed separately from the Flutter repo, and reduce the code in the Flutter repo.

The snippets code is deleted in this PR.

I also converted some comments in the snippet templates to be regular comments instead of doc comments, because having a doc comment block before the imports causes the Dart import sorter to lose the comment. They should have been regular comments in the first place.

The snippets package resides in the assets-for-api-docs repo.

The sample analysis has also been converted to be run in parallel, and I've bumped the Dartdoc version to 1.0.2.
2021-08-11 19:48:29 -07:00
Greg Spencer
169bb1b73f
Fix the sample code analyzer to properly handle missing_identifier errors (#87593)
This fixes how the sample analyzer handles missing_identifier errors. It was looking at the wrong line, and missing an else clause, so it was silently allowing missing_identifier errors to pass.

In addition, this fixes the sample generation so that it uses the correct filename for the output files: it previously was looking for the first line that had a filename, which was meant to indicate a non-generated line. This change adds a new Line.generated constructor for generated lines, so that they can also have the correct filename associated with them.
2021-08-03 17:39:12 -07:00
Greg Spencer
bf1fb6e84b
Switch sample analysis over to use package:flutter_lints (#84303)
This switches the sample analysis code to use package:flutter_lints instead of the flutter repo analysis options, so that they are compatible with a similar change to DartPad.
2021-06-09 18:09:14 -07:00
Hattomo (TomohiroHattori)
08a70e7ac8
Enable avoid_escaping_inner_quotes lint (#81153) 2021-05-19 09:54:02 -07:00
Greg Spencer
b33c7891c1
Fix the sample analyzer to analyze dart:ui and make the analyzer null safe (#80742) 2021-04-22 12:14:02 -07:00
Greg Spencer
a8d820a46e
Update samples to use repo analysis options, Fix sample templates and a ton of analyzer issues (#77868) 2021-03-11 16:45:03 -08:00
Michael Goderbauer
7e017d318e
Enable file_names and package_names lints (#77087) 2021-03-02 15:24:04 -08:00