Correct misspelled English words in comments and printed messages in Bazel's src/... directory (and run fix)
RELNOTES: None.
PiperOrigin-RevId: 222473871
diff --git a/src/test/cpp/rc_file_test.cc b/src/test/cpp/rc_file_test.cc
index 711e7b6..01a4d5a 100644
--- a/src/test/cpp/rc_file_test.cc
+++ b/src/test/cpp/rc_file_test.cc
@@ -764,7 +764,7 @@
args, blaze_exit_code::SUCCESS, "",
"WARNING: Duplicate rc file: .*myimportedbazelrc is read multiple "
"times, "
- "it is a standard rc file location but must have been unnecessarilly "
+ "it is a standard rc file location but must have been unnecessarily "
"imported earlier.\n");
}
};
@@ -920,7 +920,7 @@
args, blaze_exit_code::SUCCESS, "",
"WARNING: Duplicate rc file: .*workspace.*bazelrc is read multiple "
"times, it is a standard rc file location but must have been "
- "unnecessarilly imported earlier.\n");
+ "unnecessarily imported earlier.\n");
}
#endif // !defined(_WIN32) && !defined(__CYGWIN__)
diff --git a/src/test/java/com/google/devtools/build/android/desugar/DesugarLambdaTest.java b/src/test/java/com/google/devtools/build/android/desugar/DesugarLambdaTest.java
index 7c3d7ee..84cbecc 100644
--- a/src/test/java/com/google/devtools/build/android/desugar/DesugarLambdaTest.java
+++ b/src/test/java/com/google/devtools/build/android/desugar/DesugarLambdaTest.java
@@ -20,9 +20,7 @@
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-/**
- * Tests uncommon lambda scenarious.
- */
+/** Tests uncommon lambda scenarios. */
@RunWith(JUnit4.class)
public class DesugarLambdaTest {
diff --git a/src/test/java/com/google/devtools/build/android/desugar/DesugarMainClassTest.java b/src/test/java/com/google/devtools/build/android/desugar/DesugarMainClassTest.java
index 0392012..a799550 100644
--- a/src/test/java/com/google/devtools/build/android/desugar/DesugarMainClassTest.java
+++ b/src/test/java/com/google/devtools/build/android/desugar/DesugarMainClassTest.java
@@ -61,7 +61,7 @@
* LAMBDA_METAFACTORY_DUMPER_PROPERTY} in the command line.
*/
private void testLambdaDumpDirPassSpecifiedInCmdPass() throws IOException {
- // The following lambda ensures that the LambdaMetafactory is loaded at the beggining of this
+ // The following lambda ensures that the LambdaMetafactory is loaded at the beginning of this
// test, so that the dump directory can be registered.
Supplier<Path> supplier =
() -> {
diff --git a/src/test/java/com/google/devtools/build/android/desugar/testdata/java8/Named.java b/src/test/java/com/google/devtools/build/android/desugar/testdata/java8/Named.java
index 4c44ffd..b50c338 100644
--- a/src/test/java/com/google/devtools/build/android/desugar/testdata/java8/Named.java
+++ b/src/test/java/com/google/devtools/build/android/desugar/testdata/java8/Named.java
@@ -32,7 +32,7 @@
}
}
- /** Class whose base class implementes {@link #name}. */
+ /** Class whose base class implements {@link #name}. */
public static class ExplicitName extends ExplicitNameBase implements Named {
public ExplicitName(String name) {
super(name);
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/AspectCollectionTest.java b/src/test/java/com/google/devtools/build/lib/analysis/AspectCollectionTest.java
index a53a20d..8083c0a 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/AspectCollectionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/AspectCollectionTest.java
@@ -415,10 +415,9 @@
}
}
-
/**
- * Creates an aspect wiht a class named {@code className} advertizing a provider
- * {@code className} that requires any of providers {@code requiredAspects}.
+ * Creates an aspect with a class named {@code className} advertizing a provider {@code className}
+ * that requires any of providers {@code requiredAspects}.
*/
private Aspect createAspect(final String className, String... requiredAspects) {
ImmutableList.Builder<ImmutableSet<SkylarkProviderIdentifier>> requiredProvidersBuilder =
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/util/MockRuleCustomBehavior.java b/src/test/java/com/google/devtools/build/lib/analysis/util/MockRuleCustomBehavior.java
index 2d811dc..422f47a 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/util/MockRuleCustomBehavior.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/util/MockRuleCustomBehavior.java
@@ -18,7 +18,7 @@
import com.google.devtools.build.lib.packages.RuleClass;
/**
- * Interface for supporting arbitary custom behavior in mock rule classes.
+ * Interface for supporting arbitrary custom behavior in mock rule classes.
*
* <p>See {@link MockRule} for details and usage instructions.
*/
diff --git a/src/test/java/com/google/devtools/build/lib/concurrent/MoreFuturesTest.java b/src/test/java/com/google/devtools/build/lib/concurrent/MoreFuturesTest.java
index 227b9e7..89793ee 100644
--- a/src/test/java/com/google/devtools/build/lib/concurrent/MoreFuturesTest.java
+++ b/src/test/java/com/google/devtools/build/lib/concurrent/MoreFuturesTest.java
@@ -156,7 +156,7 @@
}
} finally {
// The @After-annotated shutdownExecutor method blocks on completion of all tasks. Since we
- // submitted a bunch of tasks that never complete, we need to explictly cancel them.
+ // submitted a bunch of tasks that never complete, we need to explicitly cancel them.
for (DelayedFuture delayedFuture : futureList) {
delayedFuture.cancel(/*mayInterruptIfRunning=*/ true);
}
diff --git a/src/test/java/com/google/devtools/build/lib/runtime/BuildEventStreamerTest.java b/src/test/java/com/google/devtools/build/lib/runtime/BuildEventStreamerTest.java
index ef62137..9d054f7 100644
--- a/src/test/java/com/google/devtools/build/lib/runtime/BuildEventStreamerTest.java
+++ b/src/test/java/com/google/devtools/build/lib/runtime/BuildEventStreamerTest.java
@@ -752,7 +752,7 @@
public void testEarlyFlushBadInitialEvent() throws Exception {
// Verify that an early flush works correctly with an unusual start event.
// In this case, we expect 3 events in the stream, in that order:
- // - an artifical progress event as initial event, to properly link in
+ // - an artificial progress event as initial event, to properly link in
// all events
// - the unusal first event we have seen, and
// - a progress event reporting the flushed messages.
diff --git a/src/test/java/com/google/devtools/build/skyframe/ParallelEvaluatorTest.java b/src/test/java/com/google/devtools/build/skyframe/ParallelEvaluatorTest.java
index 32bf400..f5c533f 100644
--- a/src/test/java/com/google/devtools/build/skyframe/ParallelEvaluatorTest.java
+++ b/src/test/java/com/google/devtools/build/skyframe/ParallelEvaluatorTest.java
@@ -239,7 +239,7 @@
throws InterruptedException {
// This is a regression test for a crash bug in
// AbstractExceptionalParallelEvaluator#doMutatingEvaluation in a very specific window of time
- // inbetween enqueueing one top-level node for evaluation and checking if another top-level node
+ // between enqueueing one top-level node for evaluation and checking if another top-level node
// is done.
// When we have two top-level nodes, A and B,
diff --git a/src/test/py/bazel/bazel_windows_cpp_test.py b/src/test/py/bazel/bazel_windows_cpp_test.py
index 108bd3b..ee20860 100644
--- a/src/test/py/bazel/bazel_windows_cpp_test.py
+++ b/src/test/py/bazel/bazel_windows_cpp_test.py
@@ -469,7 +469,7 @@
])
# Test exporting symbols using custom DEF file in cc_library.
- # Auto-generating DEF file should be disbaled when custom DEF file specified
+ # Auto-generating DEF file should be disabled when custom DEF file specified
exit_code, _, stderr = self.RunBazel([
'build', '//:lib', '-s', '--output_groups=dynamic_library',
'--features=windows_export_all_symbols'
diff --git a/src/test/shell/bazel/bazel_embedded_skylark_test.sh b/src/test/shell/bazel/bazel_embedded_skylark_test.sh
index 56f34d9..1e0733b 100755
--- a/src/test/shell/bazel/bazel_embedded_skylark_test.sh
+++ b/src/test/shell/bazel/bazel_embedded_skylark_test.sh
@@ -48,7 +48,7 @@
test_pkg_tar_quoting() {
# Verify that pkg_tar can handle file names that are allowed as lablels
- # but contain cahracters that could mess up options.
+ # but contain characters that could mess up options.
rm -rf main out
mkdir main
cd main
diff --git a/src/test/shell/bazel/bazel_proto_library_test.sh b/src/test/shell/bazel/bazel_proto_library_test.sh
index 5475ba3..f286df7 100755
--- a/src/test/shell/bazel/bazel_proto_library_test.sh
+++ b/src/test/shell/bazel/bazel_proto_library_test.sh
@@ -214,7 +214,7 @@
cat > proto_library/src/zip_code.proto <<EOF
syntax = "proto3";
-package demo; // Requried to generate valid code.
+package demo; // Required to generate valid code.
message ZipCode {
string code = 1;
@@ -267,7 +267,7 @@
cat > a/b/src/zip_code.proto <<EOF
syntax = "proto3";
-package demo; // Requried to generate valid code.
+package demo; // Required to generate valid code.
message ZipCode {
string code = 1;
diff --git a/src/test/shell/bazel/bazel_rules_test.sh b/src/test/shell/bazel/bazel_rules_test.sh
index 20c5bfb..1669928 100755
--- a/src/test/shell/bazel/bazel_rules_test.sh
+++ b/src/test/shell/bazel/bazel_rules_test.sh
@@ -307,7 +307,7 @@
local -r EXPECTED_TMP="$new_tmpdir"
fi
assert_contains "PATH=$EXPECTED_PATH" bazel-genfiles/pkg/test.out
- # Bazel respectes the client environment's TMPDIR.
+ # Bazel respects the client environment's TMPDIR.
assert_contains "TMPDIR=${EXPECTED_TMP}$" bazel-genfiles/pkg/test.out
if is_windows; then
export TMP="${old_tmpdir}"
diff --git a/src/test/shell/bazel/bazel_toolchain_test.sh b/src/test/shell/bazel/bazel_toolchain_test.sh
index cb5a8bf..341b24c 100755
--- a/src/test/shell/bazel/bazel_toolchain_test.sh
+++ b/src/test/shell/bazel/bazel_toolchain_test.sh
@@ -33,7 +33,7 @@
# Copy the project package here
# We must use -L here; the files may be symlinks into the source tree, which we
-# could inadvertantly modify below.
+# could inadvertently modify below.
cp -rL ${testdata_path}/bazel_toolchain_test_data/* .
# Rename WORKSPACE.linaro file to WORKSPACE
diff --git a/src/test/shell/bazel/bazel_workspaces_test.sh b/src/test/shell/bazel/bazel_workspaces_test.sh
index efc1c6d..6293aa7 100755
--- a/src/test/shell/bazel/bazel_workspaces_test.sh
+++ b/src/test/shell/bazel/bazel_workspaces_test.sh
@@ -63,7 +63,7 @@
num=`grep "${1}" output.log.txt | wc -l`
if [ "$num" -ne $2 ]
then
- fail "Expected exactly $2 occurences of $1, got $num: " `cat output.log.txt`
+ fail "Expected exactly $2 occurrences of $1, got $num: " `cat output.log.txt`
fi
}
@@ -71,7 +71,7 @@
num=`grep "${1}" output.log.txt | wc -l`
if [ "$num" -lt $2 ]
then
- fail "Expected at least $2 occurences of $1, got $num: " `cat output.log.txt`
+ fail "Expected at least $2 occurrences of $1, got $num: " `cat output.log.txt`
fi
}
diff --git a/src/test/shell/bazel/external_integration_test.sh b/src/test/shell/bazel/external_integration_test.sh
index 7a48ae3d..03d29a8 100755
--- a/src/test/shell/bazel/external_integration_test.sh
+++ b/src/test/shell/bazel/external_integration_test.sh
@@ -1024,7 +1024,7 @@
function test_inherit_build() {
- # Verify that http_archive can use a BUILD file shiped with the
+ # Verify that http_archive can use a BUILD file shipped with the
# external archive.
mkdir ext
cat > ext/BUILD <<'EOF'
@@ -1105,7 +1105,7 @@
urls=["file://${EXTREPODIR}/ext.zip"],
)
EOF
- bazel build '@ext//:bar' || fail "expected sucess"
+ bazel build '@ext//:bar' || fail "expected success"
# Simulate going offline by removing the external archive
rm -f "${EXTREPODIR}/ext.zip"
@@ -1159,7 +1159,7 @@
EOF
# Use the external repository once to make sure it is cached.
bazel build --repository_cache="../cache" '@ext//:bar' \
- || fail "expected sucess"
+ || fail "expected success"
# Now "go offline" and clean local resources.
rm -f "${WRKDIR}/ext.zip"
@@ -1174,7 +1174,7 @@
# Clean again.
bazel clean --expunge
- # Even with a different source URL, the cache sould be consulted.
+ # Even with a different source URL, the cache should be consulted.
cat > WORKSPACE <<EOF
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
@@ -1229,7 +1229,7 @@
)
EOF
# Use the external repository once to make sure it is cached.
- bazel build '@ext//:bar' || fail "expected sucess"
+ bazel build '@ext//:bar' || fail "expected success"
# Now "go offline" and clean local resources.
rm -f "${WRKDIR}/ext.zip"
@@ -1241,7 +1241,7 @@
# Clean again.
bazel clean --expunge
- # Even with a different source URL, the cache sould be consulted.
+ # Even with a different source URL, the cache should be consulted.
cat > WORKSPACE <<EOF
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
@@ -1287,7 +1287,7 @@
)
EOF
# Use the external repository once to make sure it is cached.
- bazel build '@ext//:foo' || fail "expected sucess"
+ bazel build '@ext//:foo' || fail "expected success"
# Now "go offline" and clean local resources.
rm -f "${TOPDIR}/ext.zip"
@@ -1328,11 +1328,11 @@
)
EOF
# Use `--repository_cache` with no path to explicitly disable repository cache
- bazel build --repository_cache= '@ext//:foo' || fail "expected sucess"
+ bazel build --repository_cache= '@ext//:foo' || fail "expected success"
# make sure, the empty path is not interpreted relative to `pwd`; i.e., we do
# not expect any new directories generated in the workspace, in particular
- # none named conent_adressable, which is the directory where the cache puts
+ # none named conent_addressable, which is the directory where the cache puts
# its artifacts into.
ls -al | grep content_addressable \
&& fail "Should not interpret empty path as cache directly in the work space" || :
@@ -1388,7 +1388,7 @@
EOF
# Use the external repository once to make sure it is cached.
bazel build --repository_cache="${TOPDIR}/cache}" '@ext//:bar' \
- || fail "expected sucess"
+ || fail "expected success"
# Now "go offline" and clean local resources.
rm -f "${TOPDIR}/ext.zip"
@@ -1403,7 +1403,7 @@
# Clean again.
bazel clean --expunge
- # Even with a different source URL, the cache sould be consulted.
+ # Even with a different source URL, the cache should be consulted.
cat > WORKSPACE <<EOF
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
diff --git a/src/test/shell/bazel/external_patching_test.sh b/src/test/shell/bazel/external_patching_test.sh
index 702494d..6ddd024 100755
--- a/src/test/shell/bazel/external_patching_test.sh
+++ b/src/test/shell/bazel/external_patching_test.sh
@@ -264,7 +264,7 @@
}
test_override_buildfile() {
- ## Verify that the BUILD file of an external repository can be overriden
+ ## Verify that the BUILD file of an external repository can be overridden
## via the http_archive rule.
EXTREPODIR=`pwd`
EXTREPOURL="$(get_extrepourl ${EXTREPODIR})"
@@ -322,7 +322,7 @@
}
test_override_buildfile_content() {
- ## Verify that the BUILD file of an external repository can be overriden
+ ## Verify that the BUILD file of an external repository can be overridden
## via specified content in the http_archive rule.
EXTREPODIR=`pwd`
EXTREPOURL="$(get_extrepourl ${EXTREPODIR})"
@@ -379,7 +379,7 @@
}
test_override_buildfile_git() {
- ## Verify that the BUILD file of an external repository can be overriden
+ ## Verify that the BUILD file of an external repository can be overridden
## via the git_repository rule.
EXTREPODIR=`pwd`
if is_windows; then
@@ -447,7 +447,7 @@
}
test_override_buildfilecontents_git() {
- ## Verify that the BUILD file of an external repository can be overriden
+ ## Verify that the BUILD file of an external repository can be overridden
## via specified content in the git_repository rule.
EXTREPODIR=`pwd`
if is_windows; then
@@ -514,7 +514,7 @@
}
test_build_file_build_bazel() {
- ## Verify that the BUILD file of an external repository can be overriden
+ ## Verify that the BUILD file of an external repository can be overridden
## via the http_archive rule.
EXTREPODIR=`pwd`
EXTREPOURL="$(get_extrepourl ${EXTREPODIR})"
diff --git a/src/test/shell/bazel/external_path_test.sh b/src/test/shell/bazel/external_path_test.sh
index 214ee34..3cf8592 100755
--- a/src/test/shell/bazel/external_path_test.sh
+++ b/src/test/shell/bazel/external_path_test.sh
@@ -86,7 +86,7 @@
test_local_paths_main () {
- # Verify that a target in the main repository may refer to a truely source
+ # Verify that a target in the main repository may refer to a truly source
# file in its own repository by a path relative to the repository root.
WRKDIR=$(mktemp -d "${TEST_TMPDIR}/testXXXXXX")
cd "${WRKDIR}"
@@ -101,7 +101,7 @@
}
test_local_paths_remote() {
- # Verify that a target in an external repository may refer to a truely source
+ # Verify that a target in an external repository may refer to a truly source
# file in its own repository by a path relative to the root of that repository
WRKDIR=$(mktemp -d "${TEST_TMPDIR}/testXXXXXX")
cd "${WRKDIR}"
@@ -128,9 +128,9 @@
}
test_lib_paths_main() {
- # Verify that libaries from the main repostiory can be used via include
+ # Verify that libaries from the main repository can be used via include
# path relative to their repository root and that they may refer to other
- # truely source files from the same libary via paths relative to their
+ # truly source files from the same library via paths relative to their
# repository root.
WRKDIR=$(mktemp -d "${TEST_TMPDIR}/testXXXXXX")
@@ -165,7 +165,7 @@
test_lib_paths_remote() {
# Verify that libaries from an external repository can be used via include
# path relative to their repository root and that they may refer to other
- # truely source files from the same libary via paths relative to their
+ # truly source files from the same library via paths relative to their
# repository root.
WRKDIR=$(mktemp -d "${TEST_TMPDIR}/testXXXXXX")
@@ -210,7 +210,7 @@
test_lib_paths_all_remote() {
# Verify that libaries from an external repository can be used by another
# external repository via include path relative to their repository root and
- # that they may refer to other truely source files from the same libary via
+ # that they may refer to other truly source files from the same library via
# paths relative to their repository root.
WRKDIR=$(mktemp -d "${TEST_TMPDIR}/testXXXXXX")
@@ -263,7 +263,7 @@
}
repo_with_local_path_reference() {
- # create, in the current working directory, a pacakge called
+ # create, in the current working directory, a package called
# withpath, that contains rule depending on hard-code path relative
# to the repository root.
mkdir -p withpath
@@ -326,7 +326,7 @@
repo_with_local_implicit_dependencies() {
# create, in the current working directory, a package called rule
# that has an implicit dependency on a target in the same repository;
- # the point here is that this dependency can be named without knowlege
+ # the point here is that this dependency can be named without knowledge
# of the repository name.
mkdir -p rule
cat > rule/BUILD <<'EOF'
diff --git a/src/test/shell/bazel/workspace_resolved_test.sh b/src/test/shell/bazel/workspace_resolved_test.sh
index f1afbd7..dab3ebf 100755
--- a/src/test/shell/bazel/workspace_resolved_test.sh
+++ b/src/test/shell/bazel/workspace_resolved_test.sh
@@ -684,7 +684,7 @@
}
create_sample_repository() {
- # Create, in the current direcotry, a repository that creates an external
+ # Create, in the current directory, a repository that creates an external
# repository `foo` containing
# - file with fixed data, generated by ctx.file,
# - a BUILD file linked from the main repository
@@ -844,7 +844,7 @@
test_usage_order_respected() {
# Verify that if one rules uses a file from another (without any load
- # statement inbetween), then still the resolved file is such that it can
+ # statement between), then still the resolved file is such that it can
# be used as a workspace replacement.
EXTREPODIR=`pwd`
tar xvf ${TEST_SRCDIR}/jdk_WORKSPACE_files/archives.tar
diff --git a/src/test/shell/integration/action_env_test.sh b/src/test/shell/integration/action_env_test.sh
index f1fe4a5..2641607 100755
--- a/src/test/shell/integration/action_env_test.sh
+++ b/src/test/shell/integration/action_env_test.sh
@@ -207,7 +207,7 @@
bazel test --test_output=all --action_env=FOO=foo //pkg:test_env_foo \
|| fail "expected to pass with correct value for FOO"
# While the test is cached, changing the environment should rerun it and
- # detect the failure in the new environemnt.
+ # detect the failure in the new environment.
(bazel test --test_output=all --action_env=FOO=bar //pkg:test_env_foo \
&& fail "expected to fail with incorrect value for FOO") || true
# Redo the same FOO being taken from the environment
diff --git a/src/test/shell/integration/build_event_stream_test.sh b/src/test/shell/integration/build_event_stream_test.sh
index badd0f6..9375f38 100755
--- a/src/test/shell/integration/build_event_stream_test.sh
+++ b/src/test/shell/integration/build_event_stream_test.sh
@@ -232,7 +232,7 @@
function test_basic() {
# Basic properties of the event stream
- # - a completed target explicity requested should be reported
+ # - a completed target explicitly requested should be reported
# - after success the stream should close naturally, without any
# reports about aborted events
# - the command line is reported in structured and unstructured form
diff --git a/src/test/shell/integration/spend_cpu_time.cc b/src/test/shell/integration/spend_cpu_time.cc
index 55b8fe9..c6eae0a 100644
--- a/src/test/shell/integration/spend_cpu_time.cc
+++ b/src/test/shell/integration/spend_cpu_time.cc
@@ -104,7 +104,7 @@
return my_rusage.ru_stime.tv_sec * 1000 + my_rusage.ru_stime.tv_usec / 1000;
}
-// Substracts subtrahend from minuend, or returns zero if the subtrahend is
+// Subtracts subtrahend from minuend, or returns zero if the subtrahend is
// larger than the minuend.
static uint64_t SubtractOrZero(const uint64_t minuend,
const uint64_t subtrahend) {
diff --git a/src/test/shell/testenv.sh b/src/test/shell/testenv.sh
index 38ee3a6..4542ce4 100755
--- a/src/test/shell/testenv.sh
+++ b/src/test/shell/testenv.sh
@@ -64,7 +64,7 @@
PATH_TO_BAZEL_WRAPPER="$(dirname $(rlocation io_bazel/src/test/shell/bin/bazel))"
# Convert PATH_TO_BAZEL_WRAPPER to Unix path style on Windows, because it will be
# added into PATH. There's problem if PATH=C:/msys64/usr/bin:/usr/local,
-# because ':' is used as both path seperator and in C:/msys64/...
+# because ':' is used as both path separator and in C:/msys64/...
if is_windows; then
PATH_TO_BAZEL_WRAPPER="$(cygpath -u "$PATH_TO_BAZEL_WRAPPER")"
fi
@@ -221,7 +221,7 @@
}
#
-# A uniform SHA-256 commands that works accross platform
+# A uniform SHA-256 commands that works across platform
#
case "${PLATFORM}" in
darwin|freebsd)