7cd95f5f91
Previously, the process for removing a lint from `pkg/linter` was the following: - Remove the lint class's override of `AbstractAnalysisRule.registerNodeProcessors` (effectively changing the rule into a no-op). - Change its override of `AnalysisRule.diagnosticCode` to return the pseudo-diagnostic code `removedLint`. - Modify its constructor to use `RuleState.removed`, so that the lint would be marked as being in the "removed" state. This change introduces a new class, `RemovedAnalysisRule`, as the standard way to represent an analysis rule that has been removed. So the new process for removing a lint from `pkg/linter` will be to remove its class entirely and instead register an instance of `RemovedAnalysisRule`. This avoids the need for the pseudo-diagnostic code `removedLint` to exist at all, and also makes the representation of a removed lint much more compact. To help encourage clients to use the new `RemovedAnalysisRule` class, the `RuleState.removed` constructor has been deprecated. It will be removed in a future version of the analyzer. Change-Id: I6a6a6964726595b7bb32664846cf4e4722bbb4f1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/463463 Commit-Queue: Paul Berry <paulberry@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>