Commit Graph

22 Commits

Author SHA1 Message Date
sigmundch
896c63eaed
[test] log stack trace on errors, to improve diagnostics on #89243 (#94885) 2021-12-09 11:54:16 -08:00
Ian Hickson
61a0add286
Enable avoid_redundant_argument_values lint (#91409) (#91462) 2021-10-08 09:25:14 -07:00
Zachary Anderson
b9d2177da0
Revert "Enable avoid_redundant_argument_values lint (#91409)" (#91461)
This reverts commit 5fd259be24.
2021-10-07 21:11:07 -07:00
Ian Hickson
5fd259be24
Enable avoid_redundant_argument_values lint (#91409) 2021-10-07 20:13:02 -07:00
Clement Skau
64841f6309
Adds analyze_sample_code exit for when pub fails (#91024) 2021-10-05 10:28:04 -07:00
Greg Spencer
fd9ce27748
Clean up examples, remove section markers and --template args (#91133)
This does a cleanup of the examples, removing all of the "section" markers and extra comments that we don't need anymore now that the samples are no longer in the source code. It also removes the --template arguments from the {@tool dartpad} and {@tool sample} directives, since those are no longer used. It converts two examples that I discovered were still embedded into linked examples in the examples folder.

I didn't delete the templates from the snippets config folder yet, because there are still embedded samples in the dart:ui package from the engine that use them. Once dart:ui no longer uses the templates, they can be removed.

I bumped the version of the snippets package to pick up a change that allows removal of the --template argument.
2021-10-04 12:16:17 -07:00
Daco Harkes
2e663b2472
[bots] Print more on --verbose analyze_sample_code (#90880) 2021-09-28 11:08:05 -07:00
Jason Simmons
518bea67fd
Update the analysis options for sample code to ignore unnecessary_imports (#90391)
See https://github.com/flutter/flutter/issues/74381
2021-09-20 09:44:58 -07:00
Greg Spencer
a7310dc0d4
Eliminate uses of pub executable in docs publishing and sample analysis. (#89181) 2021-08-30 12:16:05 -07:00
Greg Spencer
2a42069b2a
Bump snippets to 0.2.3, fix redundant global activate in docs.sh (#88123) 2021-08-12 17:37:05 -07:00
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
Sam Rawlins
b2ed8a25b5
Ignore unnecessary_import reports in sample code (#84125) 2021-06-07 12:14:06 -07:00
nt4f04uNd
80a2b6b015
Fix typos (#82589) 2021-05-20 17:19:09 -07:00
Greg Spencer
59b406c760
Sort imports when interpolating sample templates (#81873) 2021-05-07 15:34:04 -07:00
Greg Spencer
ea9d9ee9fd
Turn off directives_ordering lint when analyzing samples (#81698)
This turns off the "directives_ordering" lint when analyzing samples, since it's indeterminate what the ordering will be, given that samples derive their imports both from the template and the example code.

This is temporary to avoid broken builds, but the correct solution is to reorder the output so that the imports are ordered properly so that we give the proper example for our users.
2021-05-03 13:41:29 -07:00
Greg Spencer
7bff366b96
Convert snippets tool to null safety (#78646) 2021-04-29 22:34:04 -07:00
Phil Quitslund
1105c8b956
ignore directives ordering in generated code (#81017) 2021-04-22 21:24: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