Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix documentation generation #37

Merged
merged 1 commit into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/general.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
run: tool/gh_actions/analyze_dart_source.sh

- name: Check project documentation
run: tool/gh_actions/check_documentation.sh
run: tool/gh_actions/generate_documentation.sh

- name: Install software - Icarus Verilog
run: tool/gh_actions/install_iverilog.sh
Expand Down
29 changes: 0 additions & 29 deletions tool/gh_actions/check_documentation.sh

This file was deleted.

23 changes: 16 additions & 7 deletions tool/gh_actions/generate_documentation.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# Copyright (C) 2022-2023 Intel Corporation
# Copyright (C) 2022-2024 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause
#
# generate_documentation.sh
Expand All @@ -11,12 +11,21 @@

set -euo pipefail

# See script "check_documentation.sh" for a note on processing "dart doc" output.
# Output parsing is required because "dart doc" is not capable of
# signaling a warning with an exit code:
# https://github.com/dart-lang/dartdoc/issues/2846
# https://github.com/dart-lang/dartdoc/issues/2907
# https://github.com/dart-lang/dartdoc/issues/1959

# The documentation will be placed in the "doc/api" folder.
output=$(dart doc --validate-links 2>&1 | tee)

echo "${output}"
# Disabling --validate-links due to https://github.com/dart-lang/dartdoc/issues/3584
# output=$(dart doc --validate-links 2>&1 | tee)
output=$(dart doc 2>&1 | tee)

# In case of problems, the searched substring will not be found.
echo "${output}" | grep --silent 'no issues found'
if echo "${output}" | grep --silent -e 'no issues found' -e 'Success!'; then
echo 'Documentation check passed!'
else
echo "${output}"
echo 'Documentation failed since some issues were found'
exit 1
fi
2 changes: 1 addition & 1 deletion tool/run_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ tool/gh_actions/analyze_dart_source.sh

# Check project documentation
print_step 'Check project documentation'
tool/gh_actions/check_documentation.sh
tool/gh_actions/generate_documentation.sh

# Verify python formatting
print_step 'Verify python formatting'
Expand Down
Loading