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.
This commit is contained in:
@@ -113,6 +113,14 @@
|
||||
/// ```
|
||||
/// {@end-tool}
|
||||
///
|
||||
/// {@tool snippet}
|
||||
/// snippet with trailing comma
|
||||
///
|
||||
/// ```dart
|
||||
/// const SizedBox(),
|
||||
/// ```
|
||||
/// {@end-tool}
|
||||
///
|
||||
/// {@tool dartpad --template=stateless_widget_material}
|
||||
/// Dartpad with null-safe syntax
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user