Fix capitalization of Apple platforms, Xcode, “SDK”, and “OS”

Closes #21896.

PiperOrigin-RevId: 622960551
Change-Id: I14efe7076170cc5828464196dbbeec70d245d50c
diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock
index 4227fc4..2a0214f 100644
--- a/MODULE.bazel.lock
+++ b/MODULE.bazel.lock
@@ -2846,7 +2846,7 @@
         "bzlTransitiveDigest": "aUI/st4EW9i8qtBNAuP8n/ZqWg45cC/XT4qKpSzhCtc=",
         "recordedFileInputs": {
           "@@//MODULE.bazel": "96aa9a91f21734669335fe8cc95a151da63e3990b5489a023976df0d62f294c5",
-          "@@//src/test/tools/bzlmod/MODULE.bazel.lock": "9dfd761d5514e2594872dfeba760dd5abd378abcc638e2047972046a011bc214"
+          "@@//src/test/tools/bzlmod/MODULE.bazel.lock": "ba67b20bda45d7ad5964da5535a23f051e0e8db43641d83882ef18509d242d80"
         },
         "recordedDirentsInputs": {},
         "envVariables": {},
diff --git a/src/main/java/com/google/devtools/build/lib/actions/ExecutionRequirements.java b/src/main/java/com/google/devtools/build/lib/actions/ExecutionRequirements.java
index 2c5bc99..0fee7f0 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/ExecutionRequirements.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/ExecutionRequirements.java
@@ -286,11 +286,11 @@
    */
   public static final String GRACEFUL_TERMINATION = "supports-graceful-termination";
 
-  /** Requires the execution service to support a given xcode version e.g. "xcode_version:1.0". */
+  /** Requires the execution service to support a given Xcode version e.g. "xcode_version:1.0". */
   public static final String REQUIRES_XCODE = "requires-xcode";
 
   /**
-   * Requires the execution service to support a "label" in addition to the xcode version. The user
+   * Requires the execution service to support a "label" in addition to the Xcode version. The user
    * specifies the label as a hyphenated extension to their requested version. For example, if the
    * user requests "--xcode_version=1.0-unstable", the action request will include
    * "requires-xcode-label:unstable" and "requires-xcode:1.0".
diff --git a/src/main/java/com/google/devtools/build/lib/exec/local/XcodeLocalEnvProvider.java b/src/main/java/com/google/devtools/build/lib/exec/local/XcodeLocalEnvProvider.java
index 37b738d..5903dab 100644
--- a/src/main/java/com/google/devtools/build/lib/exec/local/XcodeLocalEnvProvider.java
+++ b/src/main/java/com/google/devtools/build/lib/exec/local/XcodeLocalEnvProvider.java
@@ -87,7 +87,7 @@
     }
 
     // Empty developer dir indicates to use the system default.
-    // TODO(bazel-team): Bazel's view of the xcode version and developer dir should be explicitly
+    // TODO(bazel-team): Bazel's view of the Xcode version and developer dir should be explicitly
     // set for build hermeticity.
     String developerDir = "";
     if (containsXcodeVersion && !containsDeveloperDir) {
@@ -110,8 +110,8 @@
    * As this is a costly operation, always call {@link #getSdkRoot(String, String)} instead, which
    * does caching.
    *
-   * @param developerDir the value of {@code DEVELOPER_DIR} for the target version of xcode
-   * @param appleSdkPlatform the sdk platform; for example, {@code iPhoneOS}
+   * @param developerDir the value of {@code DEVELOPER_DIR} for the target version of Xcode
+   * @param appleSdkPlatform the SDK platform; for example, {@code iPhoneOS}
    * @return an absolute path to the root of the target Apple SDK
    * @throws IOException if there is an issue with obtaining the root from the spawned process,
    *     either because the SDK platform/version pair doesn't exist, or there was an unexpected
@@ -139,7 +139,7 @@
             String.format(
                 "xcrun failed with code %s.\n"
                     + "This most likely indicates that the SDK platform [%s] is "
-                    + "unsupported for the target version of xcode.\n"
+                    + "unsupported for the target version of Xcode.\n"
                     + "%s\n"
                     + "stdout: %s"
                     + "stderr: %s",
@@ -167,8 +167,8 @@
    * <p>This may delegate to {@link #querySdkRoot(String, String)} to obtain the path from external
    * sources in the system. Values are cached in-memory throughout the lifetime of the Bazel server.
    *
-   * @param developerDir the value of {@code DEVELOPER_DIR} for the target version of xcode
-   * @param appleSdkPlatform the sdk platform; for example, {@code iPhoneOS}
+   * @param developerDir the value of {@code DEVELOPER_DIR} for the target version of Xcode
+   * @param appleSdkPlatform the SDK platform; for example, {@code iPhoneOS}
    * @return an absolute path to the root of the target Apple SDK
    * @throws IOException if there is an issue with obtaining the root from the spawned process,
    *     either because the SDK platform/version pair doesn't exist, or there was an unexpected
@@ -217,10 +217,10 @@
    * caching.
    *
    * @param binTools the {@link BinTools}, used to locate the cache file
-   * @param version the xcode version number to look up
+   * @param version the Xcode version number to look up
    * @return an absolute path to the root of the Xcode developer directory
    * @throws IOException if there is an issue with obtaining the path from the spawned process,
-   *     either because there is no installed xcode with the given version, or there was an
+   *     either because there is no installed Xcode with the given version, or there was an
    *     unexpected issue finding or running the tool
    */
   private static String queryDeveloperDir(BinTools binTools, DottedVersion version)
@@ -239,7 +239,7 @@
         message =
             String.format(
                 "Running '%s %s' failed with code %s.\n"
-                    + "This most likely indicates that xcode version %s is not available on the "
+                    + "This most likely indicates that Xcode version %s is not available on the "
                     + "host machine.\n"
                     + "%s\n"
                     + "stdout: %s\n"
@@ -268,7 +268,7 @@
   }
 
   /**
-   * Returns the absolute root path of the xcode developer directory on the host system for the
+   * Returns the absolute root path of the Xcode developer directory on the host system for the
    * given Xcode version.
    *
    * <p>This may delegate to {@link #queryDeveloperDir(Path, DottedVersion)} to obtain the path from
@@ -276,10 +276,10 @@
    * Bazel server.
    *
    * @param binTools the {@link BinTools} path, used to locate the cache file
-   * @param version the xcode version number to look up
+   * @param version the Xcode version number to look up
    * @return an absolute path to the root of the Xcode developer directory
    * @throws IOException if there is an issue with obtaining the path from the spawned process,
-   *     either because there is no installed xcode with the given version, or there was an
+   *     either because there is no installed Xcode with the given version, or there was an
    *     unexpected issue finding or running the tool
    */
   private static String getDeveloperDir(BinTools binTools, DottedVersion version)
diff --git a/src/main/java/com/google/devtools/build/lib/rules/apple/AppleCommandLineOptions.java b/src/main/java/com/google/devtools/build/lib/rules/apple/AppleCommandLineOptions.java
index 00907b3..6ed5229 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/apple/AppleCommandLineOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/apple/AppleCommandLineOptions.java
@@ -68,7 +68,7 @@
       effectTags = {OptionEffectTag.LOSES_INCREMENTAL_STATE},
       help =
           "Specifies the version of the iOS SDK to use to build iOS applications. "
-              + "If unspecified, uses default iOS SDK version from 'xcode_version'.")
+              + "If unspecified, uses the default iOS SDK version from 'xcode_version'.")
   public DottedVersion.Option iosSdkVersion;
 
   @Option(
@@ -79,7 +79,7 @@
       effectTags = {OptionEffectTag.LOSES_INCREMENTAL_STATE},
       help =
           "Specifies the version of the watchOS SDK to use to build watchOS applications. "
-              + "If unspecified, uses default watchOS SDK version from 'xcode_version'.")
+              + "If unspecified, uses the default watchOS SDK version from 'xcode_version'.")
   public DottedVersion.Option watchOsSdkVersion;
 
   @Option(
@@ -90,7 +90,7 @@
       effectTags = {OptionEffectTag.LOSES_INCREMENTAL_STATE},
       help =
           "Specifies the version of the tvOS SDK to use to build tvOS applications. "
-              + "If unspecified, uses default tvOS SDK version from 'xcode_version'.")
+              + "If unspecified, uses the default tvOS SDK version from 'xcode_version'.")
   public DottedVersion.Option tvOsSdkVersion;
 
   @Option(
@@ -101,7 +101,7 @@
       effectTags = {OptionEffectTag.LOSES_INCREMENTAL_STATE},
       help =
           "Specifies the version of the macOS SDK to use to build macOS applications. "
-              + "If unspecified, uses default macOS SDK version from 'xcode_version'.")
+              + "If unspecified, uses the default macOS SDK version from 'xcode_version'.")
   public DottedVersion.Option macOsSdkVersion;
 
   @Option(
@@ -329,7 +329,7 @@
       },
       help =
           "If set, add a \"requires-xcode:{version}\" execution requirement to every Xcode action."
-              + "  If the xcode version has a hyphenated label,  also add a"
+              + "  If the Xcode version has a hyphenated label,  also add a"
               + " \"requires-xcode-label:{version_label}\" execution requirement.")
   public boolean includeXcodeExecutionRequirements;
 
diff --git a/src/main/java/com/google/devtools/build/lib/rules/apple/AppleConfiguration.java b/src/main/java/com/google/devtools/build/lib/rules/apple/AppleConfiguration.java
index fd26cdb..453f290 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/apple/AppleConfiguration.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/apple/AppleConfiguration.java
@@ -43,12 +43,14 @@
 public class AppleConfiguration extends Fragment implements AppleConfigurationApi<PlatformType> {
   /** Environment variable name for the developer dir of the selected Xcode. */
   public static final String DEVELOPER_DIR_ENV_NAME = "DEVELOPER_DIR";
+
   /**
-   * Environment variable name for the xcode version. The value of this environment variable should
-   * be set to the version (for example, "7.2") of xcode to use when invoking part of the apple
+   * Environment variable name for the Xcode version. The value of this environment variable should
+   * be set to the version (for example, "7.2") of Xcode to use when invoking part of the apple
    * toolkit in action execution.
    */
   public static final String XCODE_VERSION_ENV_NAME = "XCODE_VERSION_OVERRIDE";
+
   /**
    * Environment variable name for the apple SDK version. If unset, uses the system default of the
    * host for the platform in the value of {@link #APPLE_SDK_PLATFORM_ENV_NAME}.
@@ -214,7 +216,7 @@
 
   /**
    * Returns a map of environment variables that should be propagated for actions that require a
-   * version of xcode to be explicitly declared. Keys are variable names and values are their
+   * version of Xcode to be explicitly declared. Keys are variable names and values are their
    * corresponding values.
    */
   public static ImmutableMap<String, String> getXcodeVersionEnv(DottedVersion xcodeVersion) {
@@ -456,7 +458,7 @@
   }
 
   /**
-   * Returns the label of the xcode_config rule to use for resolving the exec system xcode version.
+   * Returns the label of the xcode_config rule to use for resolving the exec system Xcode version.
    */
   @StarlarkConfigurationField(
       name = "xcode_config_label",
diff --git a/src/main/java/com/google/devtools/build/lib/rules/apple/AvailableXcodesInfo.java b/src/main/java/com/google/devtools/build/lib/rules/apple/AvailableXcodesInfo.java
index 3083abb..8bf4361 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/apple/AvailableXcodesInfo.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/apple/AvailableXcodesInfo.java
@@ -24,7 +24,7 @@
 import net.starlark.java.eval.Starlark;
 import net.starlark.java.eval.StarlarkThread;
 
-/** The available xcode versions computed from the {@code available_xcodes} rule. */
+/** The available Xcode versions computed from the {@code available_xcodes} rule. */
 @Immutable
 public class AvailableXcodesInfo extends NativeInfo {
   /** Starlark name for this provider. */
@@ -47,7 +47,7 @@
     return PROVIDER;
   }
 
-  /** Returns the available xcode versions from {@code available_xcodes}. */
+  /** Returns the available Xcode versions from {@code available_xcodes}. */
   @StarlarkMethod(
       name = "available_versions",
       structField = true,
@@ -56,7 +56,7 @@
     return availableXcodes;
   }
 
-  /** Returns the default xcode version from {@code available_xcodes}. */
+  /** Returns the default Xcode version from {@code available_xcodes}. */
   @StarlarkMethod(
       name = "default_version",
       structField = true,
diff --git a/src/main/java/com/google/devtools/build/lib/rules/apple/XcodeVersionProperties.java b/src/main/java/com/google/devtools/build/lib/rules/apple/XcodeVersionProperties.java
index 28b557a..6d866cc 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/apple/XcodeVersionProperties.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/apple/XcodeVersionProperties.java
@@ -28,7 +28,7 @@
 import net.starlark.java.eval.Starlark;
 import net.starlark.java.eval.StarlarkThread;
 
-/** A tuple containing information about a version of xcode and its properties. */
+/** A tuple containing information about a version of Xcode and its properties. */
 @Immutable
 public class XcodeVersionProperties extends NativeInfo implements XcodePropertiesApi {
   /** Starlark identifier for XcodeVersionProperties provider. */
@@ -51,10 +51,10 @@
   private final DottedVersion defaultMacosSdkVersion;
 
   /**
-   * Creates and returns a tuple representing no known xcode property information (defaults are used
+   * Creates and returns a tuple representing no known Xcode property information (defaults are used
    * where applicable).
    */
-  // TODO(bazel-team): The xcode version should be a well-defined value, either specified by the
+  // TODO(bazel-team): The Xcode version should be a well-defined value, either specified by the
   // user, evaluated on the local system, or set to a sensible default.
   // Unfortunately, until the local system evaluation hook is created, this constraint would break
   // some users.
@@ -67,7 +67,7 @@
   }
 
   /**
-   * Constructor for when only the xcode version is specified, but no property information is
+   * Constructor for when only the Xcode version is specified, but no property information is
    * specified.
    */
   public XcodeVersionProperties(Object xcodeVersion) {
@@ -116,7 +116,7 @@
     return PROVIDER;
   }
 
-  /** Returns the xcode version, or null if the xcode version is unknown. */
+  /** Returns the Xcode version, or null if the Xcode version is unknown. */
   @Nullable
   @Override
   public String getXcodeVersionString() {
@@ -126,42 +126,42 @@
     return null;
   }
 
-  /** Returns the default ios sdk version to use if this xcode version is in use. */
+  /** Returns the default iOS SDK version to use if this Xcode version is in use. */
   @Nullable
   @Override
   public String getDefaultIosSdkVersionString() {
     return defaultIosSdkVersion != null ? defaultIosSdkVersion.toString() : null;
   }
 
-  /** Returns the default visionOS sdk version to use if this xcode version is in use. */
+  /** Returns the default visionOS SDK version to use if this Xcode version is in use. */
   @Nullable
   @Override
   public String getDefaultVisionosSdkVersionString() {
     return defaultVisionosSdkVersion != null ? defaultVisionosSdkVersion.toString() : null;
   }
 
-  /** Returns the default watchos sdk version to use if this xcode version is in use. */
+  /** Returns the default watchOS SDK version to use if this Xcode version is in use. */
   @Nullable
   @Override
   public String getDefaultWatchosSdkVersionString() {
     return defaultWatchosSdkVersion != null ? defaultWatchosSdkVersion.toString() : null;
   }
 
-  /** Returns the default tvos sdk version to use if this xcode version is in use. */
+  /** Returns the default tvOS SDK version to use if this Xcode version is in use. */
   @Nullable
   @Override
   public String getDefaultTvosSdkVersionString() {
     return defaultTvosSdkVersion != null ? defaultTvosSdkVersion.toString() : null;
   }
 
-  /** Returns the default macosx sdk version to use if this xcode version is in use. */
+  /** Returns the default macOS SDK version to use if this Xcode version is in use. */
   @Nullable
   @Override
   public String getDefaultMacosSdkVersionString() {
     return defaultMacosSdkVersion != null ? defaultMacosSdkVersion.toString() : null;
   }
 
-  /** Returns the xcode version, or {@link Optional#absent} if the xcode version is unknown. */
+  /** Returns the Xcode version, or {@link Optional#absent} if the Xcode version is unknown. */
   public Optional<DottedVersion> getXcodeVersion() {
     return xcodeVersion;
   }
diff --git a/src/main/java/com/google/devtools/build/lib/rules/apple/XcodeVersionRule.java b/src/main/java/com/google/devtools/build/lib/rules/apple/XcodeVersionRule.java
index 5ea5f8e..2ccebf7 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/apple/XcodeVersionRule.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/apple/XcodeVersionRule.java
@@ -53,41 +53,41 @@
         /* <!-- #BLAZE_RULE(xcode_version).ATTRIBUTE(version) -->
         Accepted aliases for this version of Xcode.
         If the value of the <code>xcode_version</code> build flag matches any of the given
-        alias strings, this xcode version will be used.
+        alias strings, this Xcode version will be used.
         <!-- #END_BLAZE_RULE.ATTRIBUTE --> */
         .add(
             attr(ALIASES_ATTR_NAME, STRING_LIST)
                 .nonconfigurable("this rule determines configuration"))
 
         /* <!-- #BLAZE_RULE(xcode_version).ATTRIBUTE(default_ios_sdk_version) -->
-        The ios sdk version that is used by default when this version of xcode is being used.
+        The iOS SDK version that is used by default when this version of Xcode is being used.
         The <code>ios_sdk_version</code> build flag will override the value specified here.
         <!-- #END_BLAZE_RULE.ATTRIBUTE --> */
         .add(
             attr(DEFAULT_IOS_SDK_VERSION_ATTR_NAME, STRING)
                 .nonconfigurable("this rule determines configuration"))
         /* <!-- #BLAZE_RULE(xcode_version).ATTRIBUTE(default_visionos_sdk_version) -->
-        The visionos sdk version that is used by default when this version of xcode is being used.
+        The visionOS SDK version that is used by default when this version of Xcode is being used.
         <!-- #END_BLAZE_RULE.ATTRIBUTE --> */
         .add(
             attr(DEFAULT_VISIONOS_SDK_VERSION_ATTR_NAME, STRING)
                 .nonconfigurable("this rule determines configuration"))
         /* <!-- #BLAZE_RULE(xcode_version).ATTRIBUTE(default_watchos_sdk_version) -->
-        The watchos sdk version that is used by default when this version of xcode is being used.
+        The watchOS SDK version that is used by default when this version of Xcode is being used.
         The <code>watchos_sdk_version</code> build flag will override the value specified here.
         <!-- #END_BLAZE_RULE.ATTRIBUTE --> */
         .add(
             attr(DEFAULT_WATCHOS_SDK_VERSION_ATTR_NAME, STRING)
                 .nonconfigurable("this rule determines configuration"))
         /* <!-- #BLAZE_RULE(xcode_version).ATTRIBUTE(default_tvos_sdk_version) -->
-        The tvos sdk version that is used by default when this version of xcode is being used.
+        The tvOS SDK version that is used by default when this version of Xcode is being used.
         The <code>tvos_sdk_version</code> build flag will override the value specified here.
         <!-- #END_BLAZE_RULE.ATTRIBUTE --> */
         .add(
             attr(DEFAULT_TVOS_SDK_VERSION_ATTR_NAME, STRING)
                 .nonconfigurable("this rule determines configuration"))
         /* <!-- #BLAZE_RULE(xcode_version).ATTRIBUTE(default_macos_sdk_version) -->
-        The macosx sdk version that is used by default when this version of xcode is being used.
+        The macOS SDK version that is used by default when this version of Xcode is being used.
         The <code>macos_sdk_version</code> build flag will override the value specified here.
         <!-- #END_BLAZE_RULE.ATTRIBUTE --> */
         .add(
@@ -108,7 +108,7 @@
 
 /*<!-- #BLAZE_RULE (NAME = xcode_version, TYPE = OTHER, FAMILY = Objective-C) -->
 
-<p>Represents a single official xcode version with acceptable aliases for that xcode version.
+<p>Represents a single official Xcode version with acceptable aliases for that Xcode version.
 See the <code>xcode_config</code> rule.</p>
 
 <!-- #END_BLAZE_RULE -->*/
diff --git a/src/main/java/com/google/devtools/build/lib/rules/apple/XcodeVersionRuleData.java b/src/main/java/com/google/devtools/build/lib/rules/apple/XcodeVersionRuleData.java
index 9b9507a..911541e 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/apple/XcodeVersionRuleData.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/apple/XcodeVersionRuleData.java
@@ -32,11 +32,11 @@
 /**
  * A tuple containing the information in a single target of the {@code xcode_version} rule. A single
  * target of this rule contains an official version label decided by Apple, a number of supported
- * aliases one might use to reference this version, and various properties of the xcode version
+ * aliases one might use to reference this version, and various properties of the Xcode version
  * (such as default SDK versions).
  *
- * <p>For example, one may want to reference official xcode version 7.0.1 using the "7" or "7.0"
- * aliases. This official version of xcode may have a default supported iOS SDK of 9.0.
+ * <p>For example, one may want to reference official Xcode version 7.0.1 using the "7" or "7.0"
+ * aliases. This official version of Xcode may have a default supported iOS SDK of 9.0.
  */
 @Immutable
 public class XcodeVersionRuleData extends NativeInfo {
@@ -65,19 +65,19 @@
     return label;
   }
 
-  /** Returns the official xcode version the owning {@code xcode_version} target is referencing. */
+  /** Returns the official Xcode version the owning {@code xcode_version} target is referencing. */
   @StarlarkMethod(name = "version", structField = true, documented = false)
   public DottedVersion getVersion() {
     return xcodeVersionProperties.getXcodeVersion().get();
   }
 
-  /** Returns the properties of the {@code xcode_version} target's referenced xcode version. */
+  /** Returns the properties of the {@code xcode_version} target's referenced Xcode version. */
   @StarlarkMethod(name = "xcode_version_properties", structField = true, documented = false)
   public XcodeVersionProperties getXcodeVersionProperties() {
     return xcodeVersionProperties;
   }
 
-  /** Returns the accepted string aliases for this xcode version. */
+  /** Returns the accepted string aliases for this Xcode version. */
   @StarlarkMethod(name = "aliases", structField = true, documented = false)
   public List<String> getAliases() {
     return aliases;
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/AppleToolchain.java b/src/main/java/com/google/devtools/build/lib/rules/objc/AppleToolchain.java
index bdfb7f76..ee5b322 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/objc/AppleToolchain.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/objc/AppleToolchain.java
@@ -118,9 +118,7 @@
     return platformDeveloperFrameworkDir(configuration.getSingleArchPlatform());
   }
 
-  /**
-   * Base rule definition to be ancestor for rules which may require an xcode toolchain.
-   */
+  /** Base rule definition to be ancestor for rules which may require an Xcode toolchain. */
   public static class RequiresXcodeConfigRule implements RuleDefinition {
     private final RepositoryName toolsRepository;
 
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/XcodeConfigInfo.java b/src/main/java/com/google/devtools/build/lib/rules/objc/XcodeConfigInfo.java
index e948546..0a40e3f 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/objc/XcodeConfigInfo.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/objc/XcodeConfigInfo.java
@@ -187,10 +187,11 @@
       }
     }
   }
+
   /**
-   * Returns the value of the xcode version, if available. This is determined based on a combination
+   * Returns the value of the Xcode version, if available. This is determined based on a combination
    * of the {@code --xcode_version} build flag and the {@code xcode_config} target defined in the
-   * {@code --xcode_version_config} flag. Returns null if no xcode is available.
+   * {@code --xcode_version_config} flag. Returns null if no Xcode is available.
    */
   @Override
   public DottedVersion getXcodeVersion() {
diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/apple/XcodeConfigInfoApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/apple/XcodeConfigInfoApi.java
index 778d6b2..b2bf211 100644
--- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/apple/XcodeConfigInfoApi.java
+++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/apple/XcodeConfigInfoApi.java
@@ -100,12 +100,12 @@
               name = "iosSdkVersion",
               named = true,
               positional = false,
-              doc = "The ios SDK version."),
+              doc = "The iOS SDK version."),
           @Param(
               name = "iosMinimumOsVersion",
               named = true,
               positional = false,
-              doc = "The ios minimum os version."),
+              doc = "The iOS minimum OS version."),
           @Param(
               name = "visionosSdkVersion",
               named = true,
@@ -115,37 +115,37 @@
               name = "visionosMinimumOsVersion",
               named = true,
               positional = false,
-              doc = "The visionOS minimum os version."),
+              doc = "The visionOS minimum OS version."),
           @Param(
               name = "watchosSdkVersion",
               named = true,
               positional = false,
-              doc = "The watchos SDK version."),
+              doc = "The watchOS SDK version."),
           @Param(
               name = "watchosMinimumOsVersion",
               named = true,
               positional = false,
-              doc = "The watchos minimum os version."),
+              doc = "The watchOS minimum OS version."),
           @Param(
               name = "tvosSdkVersion",
               named = true,
               positional = false,
-              doc = "The tvos SDK version."),
+              doc = "The tvOS SDK version."),
           @Param(
               name = "tvosMinimumOsVersion",
               named = true,
               positional = false,
-              doc = "The tvos minimum os version."),
+              doc = "The tvOS minimum OS version."),
           @Param(
               name = "macosSdkVersion",
               named = true,
               positional = false,
-              doc = "The macos SDK version."),
+              doc = "The macOS SDK version."),
           @Param(
               name = "macosMinimumOsVersion",
               named = true,
               positional = false,
-              doc = "The macos minimum os version."),
+              doc = "The macOS minimum OS version."),
           @Param(
               name = "xcodeVersion",
               named = true,
diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/apple/XcodePropertiesApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/apple/XcodePropertiesApi.java
index 660243e..de66586 100644
--- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/apple/XcodePropertiesApi.java
+++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/apple/XcodePropertiesApi.java
@@ -37,7 +37,7 @@
 
   @StarlarkMethod(
       name = "xcode_version",
-      doc = "The xcode version, or <code>None</code> if the xcode version is unknown.",
+      doc = "The Xcode version, or <code>None</code> if the Xcode version is unknown.",
       structField = true,
       allowReturnNones = true)
   @Nullable
@@ -46,7 +46,7 @@
   @StarlarkMethod(
       name = "default_ios_sdk_version",
       doc =
-          "The default iOS sdk version for this version of xcode, or <code>None</code> if "
+          "The default iOS SDK version for this version of Xcode, or <code>None</code> if "
               + "unknown.",
       structField = true,
       allowReturnNones = true)
@@ -56,7 +56,7 @@
   @StarlarkMethod(
       name = "default_visionos_sdk_version",
       doc =
-          "The default visionOS sdk version for this version of xcode, or <code>None</code> if "
+          "The default visionOS SDK version for this version of Xcode, or <code>None</code> if "
               + "unknown.",
       structField = true,
       allowReturnNones = true)
@@ -66,7 +66,7 @@
   @StarlarkMethod(
       name = "default_watchos_sdk_version",
       doc =
-          "The default watchOS sdk version for this version of xcode, or <code>None</code> if "
+          "The default watchOS SDK version for this version of Xcode, or <code>None</code> if "
               + "unknown.",
       structField = true,
       allowReturnNones = true)
@@ -76,7 +76,7 @@
   @StarlarkMethod(
       name = "default_tvos_sdk_version",
       doc =
-          "The default tvOS sdk version for this version of xcode, or <code>None</code> if "
+          "The default tvOS SDK version for this version of Xcode, or <code>None</code> if "
               + "unknown.",
       structField = true,
       allowReturnNones = true)
@@ -86,7 +86,7 @@
   @StarlarkMethod(
       name = "default_macos_sdk_version",
       doc =
-          "The default macOS sdk version for this version of xcode, or <code>None</code> if "
+          "The default macOS SDK version for this version of Xcode, or <code>None</code> if "
               + "unknown.",
       structField = true,
       allowReturnNones = true)
diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/objc/AppleCommonApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/objc/AppleCommonApi.java
index a9f3a45..59fb65a 100644
--- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/objc/AppleCommonApi.java
+++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/objc/AppleCommonApi.java
@@ -186,7 +186,7 @@
             name = "xcode_config",
             positional = true,
             named = false,
-            doc = "A provider containing information about the xcode configuration."),
+            doc = "A provider containing information about the Xcode configuration."),
       })
   ImmutableMap<String, String> getAppleHostSystemEnv(XcodeConfigInfoApiT xcodeConfig);
 
@@ -202,12 +202,8 @@
             name = "xcode_config",
             positional = true,
             named = false,
-            doc = "A provider containing information about the xcode configuration."),
-        @Param(
-            name = "platform",
-            positional = true,
-            named = false,
-            doc = "The apple platform."),
+            doc = "A provider containing information about the Xcode configuration."),
+        @Param(name = "platform", positional = true, named = false, doc = "The apple platform."),
       })
   ImmutableMap<String, String> getTargetAppleEnvironment(
       XcodeConfigInfoApiT xcodeConfig, ApplePlatformApiT platform);
diff --git a/src/main/starlark/builtins_bzl/common/xcode/available_xcodes.bzl b/src/main/starlark/builtins_bzl/common/xcode/available_xcodes.bzl
index 358bd0d..564af85 100644
--- a/src/main/starlark/builtins_bzl/common/xcode/available_xcodes.bzl
+++ b/src/main/starlark/builtins_bzl/common/xcode/available_xcodes.bzl
@@ -31,21 +31,21 @@
 available_xcodes = rule(
     attrs = {
         "default": attr.label(
-            doc = "The default xcode version for this platform.",
+            doc = "The default Xcode version for this platform.",
             mandatory = True,
             providers = [[_builtins.internal.XcodeVersionRuleData]],
             flags = ["NONCONFIGURABLE"],
         ),
         "versions": attr.label_list(
-            doc = "The xcode versions that are available on this platform.",
+            doc = "The Xcode versions that are available on this platform.",
             providers = [[_builtins.internal.XcodeVersionRuleData]],
             flags = ["NONCONFIGURABLE"],
         ),
     },
     doc = """\
 Two targets of this rule can be depended on by an `xcode_config` rule instance
-to indicate the remotely and locally available xcode versions. This allows
-selection of an official xcode version from the collectively available xcodes.
+to indicate the remotely and locally available Xcode versions. This allows
+selection of an official Xcode version from the collectively available Xcodes.
         """,
     implementation = _available_xcodes_impl,
 )
diff --git a/src/main/starlark/builtins_bzl/common/xcode/xcode_config.bzl b/src/main/starlark/builtins_bzl/common/xcode/xcode_config.bzl
index 5743a85..6a48626 100644
--- a/src/main/starlark/builtins_bzl/common/xcode/xcode_config.bzl
+++ b/src/main/starlark/builtins_bzl/common/xcode/xcode_config.bzl
@@ -101,7 +101,7 @@
     attrs = {
         "default": attr.label(
             doc = """\
-The default official version of xcode to use.
+The default official version of Xcode to use.
 The version specified by the provided `xcode_version` target is to be used if
 no `xcode_version` build flag is specified. This is required if any
 `versions` are set. This may not be set if `remote_versions` or
@@ -143,7 +143,7 @@
     doc = """\
 A single target of this rule can be referenced by the `--xcode_version_config`
 build flag to translate the `--xcode_version` flag into an accepted official
-xcode version. This allows selection of an official xcode version from a number
+Xcode version. This allows selection of an official Xcode version from a number
 of registered aliases.
 """,
     fragments = ["apple", "cpp"],
diff --git a/src/main/starlark/builtins_bzl/common/xcode/xcode_version.bzl b/src/main/starlark/builtins_bzl/common/xcode/xcode_version.bzl
index 148c0c5..f963645 100644
--- a/src/main/starlark/builtins_bzl/common/xcode/xcode_version.bzl
+++ b/src/main/starlark/builtins_bzl/common/xcode/xcode_version.bzl
@@ -38,12 +38,12 @@
 xcode_version = rule(
     attrs = {
         "version": attr.string(doc = "The official version number of a version of Xcode.", mandatory = True),
-        "aliases": attr.string_list(doc = "Accepted aliases for this version of Xcode. If the value of the xcode_version build flag matches any of the given alias strings, this xcode version will be used.", allow_empty = True, mandatory = False),
-        "default_ios_sdk_version": attr.string(default = "8.4", doc = "The ios sdk version that is used by default when this version of xcode is being used. The --ios_sdk_version build flag will override the value specified here.", mandatory = False),
-        "default_visionos_sdk_version": attr.string(default = "1.0", doc = "The visionos sdk version that is used by default when this version of xcode is being used.", mandatory = False),
-        "default_watchos_sdk_version": attr.string(default = "2.0", doc = "The watchos sdk version that is used by default when this version of xcode is being used. The --watchos_sdk_version build flag will override the value specified here.", mandatory = False),
-        "default_tvos_sdk_version": attr.string(default = "10.11", doc = "The tvos sdk version that is used by default when this version of xcode is being used. The --tvos_sdk_version build flag will override the value specified here.", mandatory = False),
-        "default_macos_sdk_version": attr.string(default = "9.0", doc = "The macos sdk version that is used by default when this version of xcode is being used. The --macos_sdk_version build flag will override the value specified here.", mandatory = False),
+        "aliases": attr.string_list(doc = "Accepted aliases for this version of Xcode. If the value of the xcode_version build flag matches any of the given alias strings, this Xcode version will be used.", allow_empty = True, mandatory = False),
+        "default_ios_sdk_version": attr.string(default = "8.4", doc = "The iOS SDK version that is used by default when this version of Xcode is being used. The `--ios_sdk_version` build flag will override the value specified here.", mandatory = False),
+        "default_visionos_sdk_version": attr.string(default = "1.0", doc = "The visionOS SDK version that is used by default when this version of Xcode is being used.", mandatory = False),
+        "default_watchos_sdk_version": attr.string(default = "2.0", doc = "The watchOS SDK version that is used by default when this version of Xcode is being used. The `--watchos_sdk_version` build flag will override the value specified here.", mandatory = False),
+        "default_tvos_sdk_version": attr.string(default = "10.11", doc = "The tvOS SDK version that is used by default when this version of Xcode is being used. The `--tvos_sdk_version` build flag will override the value specified here.", mandatory = False),
+        "default_macos_sdk_version": attr.string(default = "9.0", doc = "The macOS SDK version that is used by default when this version of Xcode is being used. The `--macos_sdk_version` build flag will override the value specified here.", mandatory = False),
     },
     implementation = _xcode_version_impl,
 )
diff --git a/src/test/tools/bzlmod/MODULE.bazel.lock b/src/test/tools/bzlmod/MODULE.bazel.lock
index afb7dbd..d8f41e6 100644
--- a/src/test/tools/bzlmod/MODULE.bazel.lock
+++ b/src/test/tools/bzlmod/MODULE.bazel.lock
@@ -1077,7 +1077,7 @@
   "moduleExtensions": {
     "@@apple_support~//crosstool:setup.bzl%apple_cc_configure_extension": {
       "general": {
-        "bzlTransitiveDigest": "pMLFCYaRPkgXPQ8vtuNkMfiHfPmRBy6QJfnid4sWfv0=",
+        "bzlTransitiveDigest": "q07sZYYHQRmej7IYlxIigQ/7iEy9zMnOrSIagEwIG6Q=",
         "usagesDigest": "G+Wh7ELKrSnuypJ3qascrgbwzrS7Psg28ta9k4FxTH0=",
         "recordedFileInputs": {},
         "recordedDirentsInputs": {},
@@ -1178,7 +1178,7 @@
     },
     "@@bazel_tools//tools/osx:xcode_configure.bzl%xcode_configure_extension": {
       "general": {
-        "bzlTransitiveDigest": "Qh2bWTU6QW6wkrd87qrU4YeY+SG37Nvw3A0PR4Y0L2Y=",
+        "bzlTransitiveDigest": "zLDpG5CJtAVf5IHbbOETi2fbeQLGZuW+yueVxW8o7sE=",
         "usagesDigest": "KB6YWX9sttGdrsit5PNIqvCglz3pKdbLHZ3+3LaOEmY=",
         "recordedFileInputs": {},
         "recordedDirentsInputs": {},
diff --git a/tools/osx/xcode_configure.bzl b/tools/osx/xcode_configure.bzl
index a4a712a..e739170 100644
--- a/tools/osx/xcode_configure.bzl
+++ b/tools/osx/xcode_configure.bzl
@@ -42,7 +42,7 @@
     return fullstring[result_start_index:suffix_index]
 
 def _search_sdk_output(output, sdkname):
-    """Returns the sdk version given xcodebuild stdout and an sdkname."""
+    """Returns the SDK version given xcodebuild stdout and an sdkname."""
     return _search_string(output, "(%s" % sdkname, ")")
 
 def _xcode_version_output(repository_ctx, name, version, aliases, developer_dir, timeout):
@@ -148,7 +148,7 @@
     if (xcrun_result.return_code != 0):
         suggestion = ""
         if "Agreeing to the Xcode/iOS license" in xcrun_result.stderr:
-            suggestion = ("(You may need to sign the xcode license." +
+            suggestion = ("(You may need to sign the Xcode license." +
                           " Try running 'sudo xcodebuild -license')")
         error_msg = (
             "Generating xcode-locator-bin failed. {suggestion} " +
@@ -178,7 +178,7 @@
         return ([], error_msg.replace("\n", " "))
     xcode_toolchains = []
 
-    # xcode_dump is comprised of newlines with different installed xcode versions,
+    # xcode_dump is comprised of newlines with different installed Xcode versions,
     # each line of the form <version>:<comma_separated_aliases>:<developer_dir>.
     xcode_dump = xcode_locator_result.stdout
     for xcodeversion in xcode_dump.split("\n"):
@@ -278,8 +278,8 @@
     """Implementation for the local_config_xcode repository rule.
 
     Generates a BUILD file containing a root xcode_config target named 'host_xcodes',
-    which points to an xcode_version target for each version of xcode installed on
-    the local host machine. If no versions of xcode are present on the machine
+    which points to an xcode_version target for each version of Xcode installed on
+    the local host machine. If no versions of Xcode are present on the machine
     (for instance, if this is a non-darwin OS), creates a stub target.
 
     Args:
@@ -308,7 +308,7 @@
 )
 
 def xcode_configure(xcode_locator_label, remote_xcode_label = None):
-    """Generates a repository containing host xcode version information."""
+    """Generates a repository containing host Xcode version information."""
     xcode_autoconf(
         name = "local_config_xcode",
         xcode_locator = xcode_locator_label,
diff --git a/tools/osx/xcode_locator.m b/tools/osx/xcode_locator.m
index c602b0b..9c357fb 100644
--- a/tools/osx/xcode_locator.m
+++ b/tools/osx/xcode_locator.m
@@ -62,7 +62,7 @@
 // optionally add it for 6.4 and 6 if it is "better" than any entry that may
 // already be there, where "better" is defined as:
 //
-// 1. Under /Applications/. (This avoids mounted xcode versions taking
+// 1. Under /Applications/. (This avoids mounted Xcode versions taking
 //    precedence over installed versions.)
 //
 // 2. Not older (at least as high version number).