[2/3] Remove the term "sanity" in comments.

Code references are not changed.

PiperOrigin-RevId: 336215348
diff --git a/src/main/java/com/google/devtools/build/lib/graph/Digraph.java b/src/main/java/com/google/devtools/build/lib/graph/Digraph.java
index 1e51665..bb2c67e 100644
--- a/src/main/java/com/google/devtools/build/lib/graph/Digraph.java
+++ b/src/main/java/com/google/devtools/build/lib/graph/Digraph.java
@@ -80,9 +80,8 @@
   public Digraph() {}
 
   /**
-   * Sanity-check: assert that a node is indeed a member of this graph and not
-   * another one.  Perform this check whenever a function is supplied a node by
-   * the user.
+   * Check that a node is indeed a member of this graph and not another one. Perform this check
+   * whenever a function is supplied a node by the user.
    */
   private final void checkNode(Node<T> node) {
     if (getNode(node.getLabel()) != node) {
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AarImport.java b/src/main/java/com/google/devtools/build/lib/rules/android/AarImport.java
index 56d88f3..1a7f278 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/AarImport.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/AarImport.java
@@ -121,9 +121,9 @@
     ResourceApk resourceApk = ResourceApk.of(validatedResources, mergedAssets, null, null);
 
     // There isn't really any use case for building an aar_import target on its own, so the files to
-    // build could be empty. The R class JAR and merged JARs are added here as a sanity check for
-    // Bazel developers so that `bazel build java/com/my_aar_import` will fail if the resource
-    // processing or JAR merging steps fail.
+    // build could be empty. The R class JAR and merged JARs are added here as a check for Bazel
+    // developers so that `bazel build java/com/my_aar_import` will fail if the resource processing
+    // or JAR merging steps fail.
     NestedSet<Artifact> filesToBuild =
         NestedSetBuilder.<Artifact>stableOrder()
             .add(resourceApk.getValidatedResources().getJavaClassJar())
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/ConfigExpander.java b/src/main/java/com/google/devtools/build/lib/runtime/ConfigExpander.java
index bfd0c51..14b2078 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/ConfigExpander.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/ConfigExpander.java
@@ -222,7 +222,7 @@
         for (String arg : rcArgs.getArgs()) {
           expansion.add(arg);
           if (arg.length() >= 8 && arg.substring(0, 8).equals("--config")) {
-            // We have a config. For sanity, because we don't want to worry about formatting,
+            // We have a config. Because we don't want to worry about formatting,
             // we will only accept --config=value, and will not accept value on a following line.
             int charOfConfigValue = arg.indexOf('=');
             if (charOfConfigValue < 0) {
diff --git a/src/main/java/com/google/devtools/build/lib/vfs/FileSystemUtils.java b/src/main/java/com/google/devtools/build/lib/vfs/FileSystemUtils.java
index a4a11e1..ec30e22 100644
--- a/src/main/java/com/google/devtools/build/lib/vfs/FileSystemUtils.java
+++ b/src/main/java/com/google/devtools/build/lib/vfs/FileSystemUtils.java
@@ -861,11 +861,11 @@
   }
 
   /**
-   * Reads the given file {@code path}, assumed to have size {@code fileSize}, and does a sanity
-   * check on the number of bytes read.
+   * Reads the given file {@code path}, assumed to have size {@code fileSize}, and does a check on
+   * the number of bytes read.
    *
-   * <p>Use this method when you already know the size of the file. The sanity check is intended to
-   * catch issues where filesystems incorrectly truncate files.
+   * <p>Use this method when you already know the size of the file. The check is intended to catch
+   * issues where filesystems incorrectly truncate files.
    *
    * @throws IOException if there was an error, or if fewer than {@code fileSize} bytes were read.
    */
diff --git a/src/main/java/com/google/devtools/build/skyframe/NodeEntry.java b/src/main/java/com/google/devtools/build/skyframe/NodeEntry.java
index dc48fe8..82f3696 100644
--- a/src/main/java/com/google/devtools/build/skyframe/NodeEntry.java
+++ b/src/main/java/com/google/devtools/build/skyframe/NodeEntry.java
@@ -83,7 +83,7 @@
     /**
      * A forced rebuilding is in progress, likely because of a transient error on the previous build
      * or a recoverable inconsistency in the current one. The distinction between this and {@link
-     * #REBUILDING} is only needed for internal sanity checks.
+     * #REBUILDING} is only needed for internal checks.
      */
     FORCED_REBUILDING
   }
@@ -433,14 +433,14 @@
 
   /** Which edges a done NodeEntry stores (dependencies and/or reverse dependencies. */
   enum KeepEdgesPolicy {
-    /** Both deps and rdeps are stored. Incremental builds and sanity checks are possible. */
+    /** Both deps and rdeps are stored. Incremental builds and checking are possible. */
     ALL,
     /**
      * Only deps are stored. Incremental builds may be possible with a "top-down" evaluation
-     * framework. Sanity checking of reverse deps is not possible.
+     * framework. Checking of reverse deps is not possible.
      */
     JUST_DEPS,
-    /** Neither deps nor rdeps are stored. Incremental builds and sanity checking are disabled. */
+    /** Neither deps nor rdeps are stored. Incremental builds and checking are disabled. */
     NONE
   }
 }
diff --git a/src/main/java/com/google/devtools/common/options/InvocationPolicyEnforcer.java b/src/main/java/com/google/devtools/common/options/InvocationPolicyEnforcer.java
index db26e64..0e4420d 100644
--- a/src/main/java/com/google/devtools/common/options/InvocationPolicyEnforcer.java
+++ b/src/main/java/com/google/devtools/common/options/InvocationPolicyEnforcer.java
@@ -415,7 +415,7 @@
       List<String> subflagValue,
       OptionInstanceOrigin subflagOrigin,
       FlagPolicyWithContext originalPolicy) {
-    // Some sanity checks.
+    // Some checks.
     OptionDefinition subflag = subflagDesc.getOptionDefinition();
     Verify.verify(originalPolicy.policy.getOperationCase().equals(OperationCase.SET_VALUE));
     if (!subflag.allowsMultiple()) {
diff --git a/src/main/java/com/google/devtools/common/options/OptionPriority.java b/src/main/java/com/google/devtools/common/options/OptionPriority.java
index 8d669a8..ca004aa 100644
--- a/src/main/java/com/google/devtools/common/options/OptionPriority.java
+++ b/src/main/java/com/google/devtools/common/options/OptionPriority.java
@@ -76,7 +76,7 @@
   public static OptionPriority getChildPriority(OptionPriority parentPriority)
       throws OptionsParsingException {
     if (parentPriority.alreadyExpanded) {
-      // TODO(bazel-team): Either tighten sanity check or prevent multiple
+      // TODO(bazel-team): Either tighten check or prevent multiple
       // expansions when implicit requirements are set.
       logger.atWarning().log("Tried to expand option too many times.");
     }