Skip to content

Commit

Permalink
resolving mojo doc
Browse files Browse the repository at this point in the history
  • Loading branch information
sarfarazsiddiquii committed Apr 21, 2024
1 parent f9e1df1 commit 292f72d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
4 changes: 2 additions & 2 deletions stdlib/docs/style-guide.md
Expand Up @@ -61,10 +61,10 @@ and that's it!

#### API Doc String Validation

Mojo provides a command line utility, `mojo doc validate`, to validate the API doc strings in your code. This ensures that your doc strings are correctly formatted and consistent with the Mojo style guidelines.
Mojo provides a command line utility, `mojo doc`, to validate the API doc strings in your code. This ensures that your doc strings are correctly formatted and consistent with the Mojo style guidelines.

```bash
> mojo doc validate example.mojo
> mojo doc -warn-missing-doc-strings -o /dev/null example.mojo
All done! ✨ 🍰 ✨
1 file left unchanged.
```
Expand Down
7 changes: 0 additions & 7 deletions stdlib/scripts/build-stdlib.sh
Expand Up @@ -39,11 +39,4 @@ STDLIB_PACKAGE_NAME="stdlib.mojopkg"
FULL_STDLIB_PACKAGE_PATH="${BUILD_DIR}"/"${STDLIB_PACKAGE_NAME}"
mojo package "${STDLIB_PATH}" -o "${FULL_STDLIB_PACKAGE_PATH}"

echo "Validating API documentation strings in the Standard Library."

mojo doc validate "${STDLIB_PATH}" || {
echo "Documentation validation failed. Please check the API documentation strings."
exit 1
}

echo Successfully created "${FULL_STDLIB_PACKAGE_PATH}"
6 changes: 0 additions & 6 deletions stdlib/scripts/run-tests.sh
Expand Up @@ -23,12 +23,6 @@ mkdir -p "${BUILD_DIR}"

source "${SCRIPT_DIR}"/build-stdlib.sh

echo "Validating API documentation strings in the Standard Library."
mojo doc validate "${REPO_ROOT}/stdlib/src" || {
echo "Documentation validation failed. Please check the API documentation strings."
exit 1
}

echo "Packaging up the test_utils."
TEST_UTILS_PATH="${REPO_ROOT}/stdlib/test/test_utils"
mojo package "${TEST_UTILS_PATH}" -o "${BUILD_DIR}/test_utils.mojopkg"
Expand Down

0 comments on commit 292f72d

Please sign in to comment.