Skip to content

Conversation

@goderbauer
Copy link
Member

@goderbauer goderbauer commented May 11, 2022

Prior to this change we were analyzing the API examples in examples/api twice as part of flutter analyze --flutter-repo and as part of running dev/bots/analyze_sample_code.dart. This change removes the duplication.

All changes included in this PR:

  • remove analyzing examples/api from analyze_sample_code.dart (this is already covered by flutter analyze --flutter-repo)
  • renaming analyze_sample_code.dart to analyze_snippet_code.dart since it is now only in charge of analyzing {@tool snippet} sections
  • unify terminology (snippet vs. sample)
  • use pubspec.yaml from examples/api to analyze snippets for consistency between snippets and samples
  • use analysis_options.yaml from examples/api to analyze snippets for consistency between snippets and samples
  • clean up warnings in snippets that surfaced due to the previous two changes

Note to reviewers: git/github unhelpfuly thinks that analyze_snippet_code.dart and analyze_snippet_code_test.dart are NEW files instead of recognizing that the files just have been renamed. It may be helpful to review the two commits of the PR separately. The first commit just contains renaming the files. The second commit then shows the modifications to the renamed files as a proper diff.

@flutter-dashboard flutter-dashboard bot added a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos documentation f: material design flutter/packages/flutter/material repository. f: routes Navigator, Router, and related APIs. framework flutter/packages/flutter repository. See also f: labels. c: contributor-productivity Team-specific productivity, code health, technical debt. labels May 11, 2022
@goderbauer
Copy link
Member Author

/cc @HansMuller This should unblock the analyzer issue in your code sample that you pinged me about the other day.

Copy link
Contributor

@gspencergoog gspencergoog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) c: contributor-productivity Team-specific productivity, code health, technical debt. c: tech-debt Technical debt, code quality, testing, etc. d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos f: material design flutter/packages/flutter/material repository. f: routes Navigator, Router, and related APIs. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants