Class MapDiagnosticToSuppression

java.lang.Object
com.google.javascript.jscomp.MapDiagnosticToSuppression

public final class MapDiagnosticToSuppression extends Object
Prints out a map from diagnostic id to suppression.

This can be used by tooling to automatically suppress errors given a list of diagnostics or to generate documentation.

A few potentially confusing aspects of this class:

  • Some diagnostic ids are not suppressible, and so are not included in the map.
  • Some diagnostics have multiple possible suppressions. We arbitrarily choose one suppression, with two exceptions: use visibility over accessControls, and use anything over missingSourcesWarnings. TODO(lharker): we could also make this configurable from the command line.
  • Some suppression groups are not usable in at-suppress annotations, as configured in the Parser, and are not included in the map.
  • Method Details

    • main

      public static void main(String[] args)