com.google.javascript.jscomp.AllowlistWarningsGuard.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of closure-compiler-unshaded Show documentation
Show all versions of closure-compiler-unshaded Show documentation
Closure Compiler is a JavaScript optimizing compiler. It parses your
JavaScript, analyzes it, removes dead code and rewrites and minimizes
what's left. It also checks syntax, variable references, and types, and
warns about common JavaScript pitfalls. It is used in many of Google's
JavaScript apps, including Gmail, Google Web Search, Google Maps, and
Google Docs.
The newest version!
???? 7?
&com/google/common/collect/ImmutableSet of *()Lcom/google/common/collect/ImmutableSet;
3com/google/javascript/jscomp/AllowlistWarningsGuard (Ljava/util/Set;)V
*com/google/javascript/jscomp/WarningsGuard ()V
$com/google/common/base/Preconditions checkNotNull &(Ljava/lang/Object;)Ljava/lang/Object;
normalizeAllowlist 9(Ljava/util/Set;)Lcom/google/common/collect/ImmutableSet; allowlist (Lcom/google/common/collect/ImmutableSet; ! java/util/LinkedHashSet
$ % & ' (
java/util/Set iterator ()Ljava/util/Iterator; * + , - . java/util/Iterator hasNext ()Z * 0 1 2 next ()Ljava/lang/Object; 4 java/lang/String
3 6 7 8 trim ()Ljava/lang/String;
3 : ; . isEmpty
3 = > ? charAt (I)C A B C LINE_NUMBER Ljava/util/regex/Pattern;
E F G H I java/util/regex/Pattern matcher 3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher; K :
M N O P Q java/util/regex/Matcher replaceFirst &(Ljava/lang/String;)Ljava/lang/String; $ S T U add (Ljava/lang/Object;)Z
W X Y copyOf @(Ljava/util/Collection;)Lcom/google/common/collect/ImmutableSet;
[ \ ] ^ _ $com/google/javascript/jscomp/JSError getDefaultLevel +()Lcom/google/javascript/jscomp/CheckLevel; a b c d e 'com/google/javascript/jscomp/CheckLevel ERROR )Lcom/google/javascript/jscomp/CheckLevel;
a g h U equals
:
k l m
formatWarning :(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;
o p q containWarning (Ljava/lang/String;)Z a s t e WARNING
v w U contains y z { | } 3com/google/javascript/jscomp/WarningsGuard$Priority SUPPRESS_BY_ALLOWLIST 5Lcom/google/javascript/jscomp/WarningsGuard$Priority;
y ? ? getValue ()I
? ? ? loadAllowlistedJsWarnings (Ljava/io/File;)Ljava/util/Set; ? ? ? ? ? !java/nio/charset/StandardCharsets UTF_8 Ljava/nio/charset/Charset;
? ? ? ? ? com/google/common/io/Files asCharSource K(Ljava/io/File;Ljava/nio/charset/Charset;)Lcom/google/common/io/CharSource;
? ? ? 2(Lcom/google/common/io/CharSource;)Ljava/util/Set;
? ? ? ? ? com/google/common/io/CharSource
openStream ()Ljava/io/Reader;
? ? ? !(Ljava/io/Reader;)Ljava/util/Set; ? java/io/IOException ? java/lang/RuntimeException
? ? ? (Ljava/lang/Throwable;)V
? ? ? ? ? com/google/common/io/CharStreams readLines &(Ljava/lang/Readable;)Ljava/util/List; $ ? ? ? addAll (Ljava/util/Collection;)Z
? l ? ;(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String; ? java/lang/StringBuilder
?
[ ? ? 8
getSourceName
? ? Q normalizeSourceName
? ? ? ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder;
[ ? ? ?
getLineNumber
? ? ? ? (I)Ljava/lang/StringBuilder; ? ? ?
LINE_SPLITTER !Lcom/google/common/base/Splitter;
[ ? ? 8 getDescription
? ? ? ? ? com/google/common/base/Splitter splitToList *(Ljava/lang/CharSequence;)Ljava/util/List; ? ? ? ? ? ? java/util/List get (I)Ljava/lang/Object; ? ? ? ? size ?
# ?
? ? ? 8 toString ? blaze-out/[^/]*/(bin|genfiles)/ ?
3 ? P ? 8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
3 ? ? ? indexOf (I)I
3 ? ? ? substring (II)Ljava/lang/String;
? ? ? ? on $(C)Lcom/google/common/base/Splitter; ? :-?\d+
E ? ? ? compile -(Ljava/lang/String;)Ljava/util/regex/Pattern; Signature ; Code LineNumberTable LocalVariableTable this 5Lcom/google/javascript/jscomp/AllowlistWarningsGuard; Ljava/util/Set; LocalVariableTypeTable #Ljava/util/Set; MethodParameters &(Ljava/util/Set;)V trimmed Ljava/lang/String; line result
StackMapTable a(Ljava/util/Set;)Lcom/google/common/collect/ImmutableSet; level Q(Lcom/google/javascript/jscomp/JSError;)Lcom/google/javascript/jscomp/CheckLevel; error &Lcom/google/javascript/jscomp/JSError; RuntimeVisibleTypeAnnotations #Lorg/jspecify/annotations/Nullable; formattedWarning getPriority fromFile E(Ljava/io/File;)Lcom/google/javascript/jscomp/AllowlistWarningsGuard; file Ljava/io/File; 3(Ljava/io/File;)Ljava/util/Set; e Ljava/io/IOException; supplier !Lcom/google/common/io/CharSource; F(Lcom/google/common/io/CharSource;)Ljava/util/Set; reader Ljava/io/Reader;
Exceptions 5(Ljava/io/Reader;)Ljava/util/Set; i I withMetaData Z sb Ljava/lang/StringBuilder; lines Ljava/util/List; $Ljava/util/List;
sourceName getFirstLine warning
lineLength
SourceFile AllowlistWarningsGuard.java RuntimeInvisibleAnnotations /Lcom/google/common/annotations/GwtIncompatible; value java.io, java.util.regex NestMembers; Dcom/google/javascript/jscomp/AllowlistWarningsGuard$AllowlistBuilder InnerClasses Priority AllowlistBuilder ! ? ? ? ? B C ? 6 *? ? ?
<