[analyzer] Remove HintCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT

We may move this to be a Lint (https://github.com/dart-lang/linter/issues/3939)
but for now there is no loss, as we never generate this diagnostic.

Bug: https://github.com/dart-lang/sdk/issues/50796 and
Change-Id: I4877884288a64722da4b5147f51cc3ecf934a76b
https://github.com/dart-lang/sdk/issues/48042
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282801
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
diff --git a/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml b/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml
index 8e802a9..96ad5a3 100644
--- a/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml
+++ b/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml
@@ -1474,11 +1474,6 @@
   status: hasFix
 HintCode.OVERRIDE_ON_NON_OVERRIDING_SETTER:
   status: hasFix
-HintCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT:
-  status: needsFix
-  notes: |-
-    We should be able to convert the import into a `package:` import. At least
-    some of the time.
 HintCode.STRICT_RAW_TYPE:
   status: needsFix
   notes: |-
diff --git a/pkg/analyzer/lib/src/dart/error/hint_codes.g.dart b/pkg/analyzer/lib/src/dart/error/hint_codes.g.dart
index 9e0814a..e7cf217 100644
--- a/pkg/analyzer/lib/src/dart/error/hint_codes.g.dart
+++ b/pkg/analyzer/lib/src/dart/error/hint_codes.g.dart
@@ -418,15 +418,6 @@
     uniqueName: 'OVERRIDE_ON_NON_OVERRIDING_SETTER',
   );
 
-  ///  It is a bad practice for a package import to reference anything outside the
-  ///  given package, or more generally, it is bad practice for a package import
-  ///  to contain a "..". For example, a source file should not contain a
-  ///  directive such as `import 'package:foo/../some.dart'`.
-  static const HintCode PACKAGE_IMPORT_CONTAINS_DOT_DOT = HintCode(
-    'PACKAGE_IMPORT_CONTAINS_DOT_DOT',
-    "A package import shouldn't contain '..'.",
-  );
-
   ///  When "strict-raw-types" is enabled, "raw types" must have type arguments.
   ///
   ///  A "raw type" is a type name that does not use inference to fill in missing
diff --git a/pkg/analyzer/lib/src/error/error_code_values.g.dart b/pkg/analyzer/lib/src/error/error_code_values.g.dart
index 8179721..86f4a80 100644
--- a/pkg/analyzer/lib/src/error/error_code_values.g.dart
+++ b/pkg/analyzer/lib/src/error/error_code_values.g.dart
@@ -611,7 +611,6 @@
   HintCode.OVERRIDE_ON_NON_OVERRIDING_GETTER,
   HintCode.OVERRIDE_ON_NON_OVERRIDING_METHOD,
   HintCode.OVERRIDE_ON_NON_OVERRIDING_SETTER,
-  HintCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT,
   HintCode.STRICT_RAW_TYPE,
   HintCode.SUBTYPE_OF_SEALED_CLASS,
   HintCode.TEXT_DIRECTION_CODE_POINT_IN_COMMENT,
diff --git a/pkg/analyzer/messages.yaml b/pkg/analyzer/messages.yaml
index bef1a39..9d49451 100644
--- a/pkg/analyzer/messages.yaml
+++ b/pkg/analyzer/messages.yaml
@@ -19078,13 +19078,6 @@
       A setter with the override annotation does not override an existing setter.
 
       No parameters.
-  PACKAGE_IMPORT_CONTAINS_DOT_DOT:
-    problemMessage: "A package import shouldn't contain '..'."
-    comment: |-
-      It is a bad practice for a package import to reference anything outside the
-      given package, or more generally, it is bad practice for a package import
-      to contain a "..". For example, a source file should not contain a
-      directive such as `import 'package:foo/../some.dart'`.
   STRICT_RAW_TYPE:
     problemMessage: "The generic type '{0}' should have explicit type arguments but doesn't."
     correctionMessage: "Use explicit type arguments for '{0}'."
diff --git a/pkg/analyzer/test/generated/non_hint_code_test.dart b/pkg/analyzer/test/generated/non_hint_code_test.dart
index b8d3aab..0d2e522 100644
--- a/pkg/analyzer/test/generated/non_hint_code_test.dart
+++ b/pkg/analyzer/test/generated/non_hint_code_test.dart
@@ -152,24 +152,6 @@
     ]);
   }
 
-  test_import_packageWithDotDot() async {
-    await assertErrorsInCode('''
-import 'package:somepackage/../other.dart';
-''', [
-      error(CompileTimeErrorCode.URI_DOES_NOT_EXIST, 0, 0),
-      error(HintCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT, 0, 0),
-    ]);
-  }
-
-  test_import_packageWithLeadingDotDot() async {
-    await assertErrorsInCode('''
-import 'package:../other.dart';
-''', [
-      error(CompileTimeErrorCode.URI_DOES_NOT_EXIST, 0, 0),
-      error(HintCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT, 0, 0),
-    ]);
-  }
-
   test_import_referenceIntoLibDirectory() async {
     newFile("/myproj/pubspec.yaml", '');
     newFile("/myproj/lib/other.dart", '');