1. 04 Aug, 2021 1 commit
    • Greg Spencer's avatar
      Fix the sample code analyzer to properly handle `missing_identifier` errors (#87593) · 169bb1b7
      Greg Spencer authored
      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.
      169bb1b7
  2. 10 Jun, 2021 1 commit
  3. 19 May, 2021 1 commit
  4. 22 Apr, 2021 1 commit
  5. 12 Mar, 2021 1 commit
  6. 02 Mar, 2021 1 commit
  7. 06 Jan, 2021 1 commit
  8. 11 Dec, 2020 1 commit
  9. 23 Sep, 2020 1 commit
    • Jonah Williams's avatar
      [flutter_tools] only lock if an upgrade/download will be performed... · f1472e1f
      Jonah Williams authored
      [flutter_tools] only lock if an upgrade/download will be performed (linux/macos) and output building messages to stderr (#65422)
      
      Currently an invocation of flutter/dart will always attempt to acquire a lock. This can pose problems for tools that attempt to run multiple dart/flutter instances.
      
      Instead update the lock logic (on Linux/macOS) so that we only attempt to acquire it if an update/snapshot needs to be performed. To avoid repeatedly performing downloads/snapshots if multiple flutter/dart invocations are fired off concurrently when an update needs to be performed, do a second check of the download/snapshot condition after the lock is released.
      
      Additionally, moves all of the building/debug output to stderr on both the bash and batch scripts. This allows machine mode consumption of the tool to ignore needing to parse/handle the rebuild messages.
      f1472e1f
  10. 08 Jan, 2020 1 commit
  11. 16 Dec, 2019 2 commits
  12. 27 Nov, 2019 1 commit
    • Ian Hickson's avatar
      License update (#45373) · 449f4a66
      Ian Hickson authored
      * Update project.pbxproj files to say Flutter rather than Chromium
      
      Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.
      
      * Update the copyright notice checker to require a standard notice on all files
      
      * Update copyrights on Dart files. (This was a mechanical commit.)
      
      * Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.
      
      Some were already marked "The Flutter Authors", not clear why. Their
      dates have been normalized. Some were missing the blank line after the
      license. Some were randomly different in trivial ways for no apparent
      reason (e.g. missing the trailing period).
      
      * Clean up the copyrights in non-Dart files. (Manual edits.)
      
      Also, make sure templates don't have copyrights.
      
      * Fix some more ORGANIZATIONNAMEs
      449f4a66
  13. 19 Nov, 2019 1 commit
    • Greg Spencer's avatar
      Analyze dartpad (#45124) · a3186fba
      Greg Spencer authored
      This fixes the sample code analysis to treat dartpad snippets in the same way as snippet snippets, which it wasn't until now (the snippet generator was treating them as "samples"), and some errors crept in. This PR also fixes those errors.
      
      Also, added a --verbose option to the sample analyzer.
      a3186fba
  14. 02 Apr, 2019 1 commit
  15. 15 Feb, 2019 1 commit
    • Greg Spencer's avatar
      Remove remaining "## Sample code" segments, and fix the snippet generator. (#27793) · 262f12b4
      Greg Spencer authored
      This converts all remaining "## Sample code" segments into snippets, and fixes
      the snippet generator to handle multiple snippets in the same dartdoc block
      properly.
      
      I also generated, compiled, and ran each of the existing application samples,
      and fixed them up to be more useful and/or just run without errors.
      
      This PR fixes these problems with examples:
      
      1. Switching tabs in a snippet now works if there is more than one snippet in
         a single dartdoc block.
      2. Generation of snippet code now works if there is more than one snippet.
      3. Contrast of text and links in the code sample block has been improved to
         recommended levels.
      4. Added five new snippet templates, including a "freeform" template to make
         it possible to show examples that need to change the app instantiation.
      5. Fixed several examples to run properly, a couple by adding the "Scaffold"
         widget to the template, a couple by just fixing their code.
      6. Fixed visual look of some of the samples when they run by placing many
         samples inside of a Scaffold.
      7. In order to make it easier to run locally, changed the sample analyzer to
         remove the contents of the supplied temp directory before running, since
         having files that hang around is problematic (only a problem when running
         locally with the `--temp` argument).
      8. Added a `SampleCheckerException` class, and handle sample checking
         exceptions more gracefully.
      9. Deprecated the old "## Sample code" designation, and added enforcement for
         the deprecation.
      10. Removed unnecessary `new` from templates (although they never appeared in
         the samples thanks to dartfmt, but still).
      
      Fixes #26398
      Fixes #27411
      262f12b4
  16. 05 Nov, 2018 1 commit
    • Greg Spencer's avatar
      Rewrite the analyze-sample-code script to also analyze snippets (#23893) · 202b045b
      Greg Spencer authored
      This rewrites the sample code analysis script to be a little less of a hack (but still not pretty), and to handle snippets as well.
      
      It also changes the semantics of how sample code is handled: the namespace for the sample code is now limited to the file that it appears in, so some additional "Examples can assume:" blocks were added. The upside of this is that there will be far fewer name collisions.
      
      I fixed the output too: no longer will you get 4000 lines of numbered output with the error at the top and have to grep for the actual problem. It gives the filename and line number of the original location of the code (in the comment in the tree), and prints out the source code on the line that caused the problem along with the error.
      
      For snippets, it prints out the location of the start of the snippet and the source code line that causes the problem. It can't print out the original line, because snippets get formatted when they are written, so the line might not be in the same place.
      202b045b
  17. 01 Oct, 2018 1 commit
  18. 12 Sep, 2018 1 commit
  19. 07 Sep, 2018 1 commit
  20. 20 Aug, 2018 1 commit
    • Ian Hickson's avatar
      `flutter analyze` cleanup (#20490) · ad1eaff4
      Ian Hickson authored
      * `flutter analyze` cleanup
      
      * Make `--dartdocs` work in all modes.
      * Make `analyze-sample-code.dart` more resilient.
      * Add a test for `analyze-sample-code.dart`.
      * Minor cleanup in related code and files.
      
      * Apply review comments
      
      * Fix tests
      ad1eaff4