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

CMake Doc Link Checker #3403

Merged
merged 1 commit into from
Nov 30, 2020
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
5 changes: 5 additions & 0 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ function(build_docs)
COMMENT "Generating OpenVINO documentation"
VERBATIM)

add_custom_target(docs_check
COMMAND ${Python3_EXECUTABLE} ${LINKCHECKER_EXECUTABLE} ${DOCS_BUILD_DIR}/html/ -f ${DOXYGEN_DIR}/linkchecker_filter.yaml --no_recursive -l ${DOCS_BUILD_DIR}
Copy link
Contributor

@ilya-lavrenov ilya-lavrenov Nov 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LINKCHECKER_EXECUTABLE is empty since it's not defined in the project. Let's add LINKCHECKER_EXECUTABLE option to cmake/features.cmake and enable this step only if LINKCHECKER_EXECUTABLE is defined and file exists.

BTW, since this is a python script, can we rename to LINKCHECKER_PY?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

paths like ${DOCS_BUILD_DIR}/html/ must be quoted with "

COMMENT "Check links in generated documentation"
VERBATIM)

set_target_properties(openvino_docs ie_docs c_api py_api preprocess_docs plugin_api
PROPERTIES FOLDER docs)

Expand Down
4 changes: 4 additions & 0 deletions docs/doxygen/linkchecker_filter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
exclude_links:
- '.*?\@ref omz.*'
- '.*?\@ref pot.*'
- '.*?\@ref workbench.*'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

am I right that all other links are correct? I don't believe in it 😄