Remove analyze adhoc test.

The test was moved to shard tests and can be safely removed safely from
recipes.

Bug: https://github.com/flutter/flutter/issues/139153
Change-Id: I2662276d45edb76ba5552fd7b5bf3b0c7b3f1095
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/52705
Reviewed-by: Yusuf Mohsinally <mohsinally@google.com>
Commit-Queue: Godofredo Contreras <godofredoc@google.com>
diff --git a/recipe_modules/adhoc_validation/api.py b/recipe_modules/adhoc_validation/api.py
index 5180fc8..5624b66 100644
--- a/recipe_modules/adhoc_validation/api.py
+++ b/recipe_modules/adhoc_validation/api.py
@@ -17,8 +17,7 @@
   def available_validations(self):
     """Returns the list of accepted validations."""
     return [
-        'analyze', 'docs', 'fuchsia_precache', 'verify_binaries_codesigned',
-        'docs_deploy'
+        'docs', 'fuchsia_precache', 'verify_binaries_codesigned', 'docs_deploy'
     ]
 
   def run(self, name, validation, env, env_prefixes, secrets=None):
diff --git a/recipe_modules/adhoc_validation/examples/full.expected/invalid_validation.json b/recipe_modules/adhoc_validation/examples/full.expected/invalid_validation.json
index 532d800..3dcf8e6 100644
--- a/recipe_modules/adhoc_validation/examples/full.expected/invalid_validation.json
+++ b/recipe_modules/adhoc_validation/examples/full.expected/invalid_validation.json
@@ -19,7 +19,7 @@
       "Traceback (most recent call last):",
       "  File \"RECIPE_REPO[flutter]/recipe_modules/adhoc_validation/examples/full.py\", line 26, in RunSteps",
       "    api.adhoc_validation.run('Docs', validation, {}, {})",
-      "  File \"RECIPE_REPO[flutter]/recipe_modules/adhoc_validation/api.py\", line 37, in run",
+      "  File \"RECIPE_REPO[flutter]/recipe_modules/adhoc_validation/api.py\", line 36, in run",
       "    raise AssertionError(msg)",
       "AssertionError('invalid is not listed in available_validations.')"
     ]
diff --git a/recipe_modules/adhoc_validation/resources/analyze.sh b/recipe_modules/adhoc_validation/resources/analyze.sh
deleted file mode 100644
index 956dbaa..0000000
--- a/recipe_modules/adhoc_validation/resources/analyze.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-#
-# Runs dart analyzer script in the current folder.
-set -e
-dart --enable-asserts ./dev/bots/analyze.dart
diff --git a/recipes/flutter/flutter.expected/validators.json b/recipes/flutter/flutter.expected/validators.json
index 80303e6..9810996 100644
--- a/recipes/flutter/flutter.expected/validators.json
+++ b/recipes/flutter/flutter.expected/validators.json
@@ -205,13 +205,13 @@
   },
   {
     "cmd": [],
-    "name": "dart analyze"
+    "name": "docs"
   },
   {
     "cmd": [
       "chmod",
       "755",
-      "RECIPE_MODULE[flutter::adhoc_validation]/resources/analyze.sh"
+      "RECIPE_MODULE[flutter::adhoc_validation]/resources/docs.sh"
     ],
     "cwd": "[START_DIR]/\u00c1 flutter sdk",
     "env": {
@@ -233,12 +233,83 @@
       ]
     },
     "infra_step": true,
-    "name": "dart analyze.Set execute permission",
+    "name": "docs.Set execute permission",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
   },
   {
+    "cmd": [],
+    "name": "docs.Identify branches",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "rev-parse",
+      "HEAD"
+    ],
+    "cwd": "[START_DIR]/\u00c1 flutter sdk",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "GIT_BRANCH": "",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "linux",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[START_DIR]/\u00c1 flutter sdk"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[START_DIR]/\u00c1 flutter sdk/bin",
+        "[START_DIR]/\u00c1 flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "name": "docs.Identify branches.git rev-parse",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "branch",
+      "-a",
+      "--contains",
+      "12345abcde12345abcde12345abcde12345abcde"
+    ],
+    "cwd": "[START_DIR]/\u00c1 flutter sdk",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "GIT_BRANCH": "",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "linux",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[START_DIR]/\u00c1 flutter sdk"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[START_DIR]/\u00c1 flutter sdk/bin",
+        "[START_DIR]/\u00c1 flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "name": "docs.Identify branches.git branch",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
     "cmd": [
       "vpython3",
       "-u",
@@ -246,7 +317,7 @@
       "--json-output",
       "/path/to/tmp/json",
       "copy",
-      "RECIPE_MODULE[flutter::adhoc_validation]/resources/analyze.sh",
+      "RECIPE_MODULE[flutter::adhoc_validation]/resources/docs.sh",
       "/path/to/tmp/"
     ],
     "cwd": "[START_DIR]/\u00c1 flutter sdk",
@@ -271,15 +342,15 @@
       ]
     },
     "infra_step": true,
-    "name": "dart analyze.print script analyze.sh",
+    "name": "docs.print script docs.sh",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@STEP_LOG_END@analyze.sh@@@"
+      "@@@STEP_LOG_END@docs.sh@@@"
     ]
   },
   {
     "cmd": [
-      "RECIPE_MODULE[flutter::adhoc_validation]/resources/analyze.sh"
+      "RECIPE_MODULE[flutter::adhoc_validation]/resources/docs.sh"
     ],
     "cwd": "[START_DIR]/\u00c1 flutter sdk",
     "env": {
@@ -302,7 +373,7 @@
         "[START_DIR]/\u00c1 flutter sdk/bin/cache/dart-sdk/bin"
       ]
     },
-    "name": "dart analyze.analyze",
+    "name": "docs.docs",
     "timeout": 4500,
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
diff --git a/recipes/flutter/flutter.py b/recipes/flutter/flutter.py
index 962ef44..07b46c6 100644
--- a/recipes/flutter/flutter.py
+++ b/recipes/flutter/flutter.py
@@ -69,8 +69,7 @@
     deferred = []
     deferred.append(
         api.defer(
-            api.adhoc_validation.run,
-            api.properties.get('validation_name'),
+            api.adhoc_validation.run, api.properties.get('validation_name'),
             api.properties.get('validation'), env, env_prefixes,
             api.properties.get('secrets', {})
         )
@@ -86,8 +85,8 @@
   yield api.test(
       'validators',
       api.properties(
-          validation='analyze',
-          validation_name='dart analyze',
+          validation='docs',
+          validation_name='docs',
           android_sdk_license='android_license',
           android_sdk_preview_license='android_preview_license'
       ), api.repo_util.flutter_environment_data()