From 459a6e9444b96eac96a30c92aefeb52a9a8a0e50 Mon Sep 17 00:00:00 2001 From: Zijian Zhu <107361923+Zijian-Zhu@users.noreply.github.com> Date: Tue, 15 Aug 2023 14:32:50 -0700 Subject: [PATCH] [DOCFIX] Update checkstyle pr build check update the check-docs as well pr-link: Alluxio/alluxio#17995 change-id: cid-5bcfa56a7696a65e93b0de460585a7807c9f5f82 --- dev/scripts/src/alluxio.org/check-docs/main.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/dev/scripts/src/alluxio.org/check-docs/main.go b/dev/scripts/src/alluxio.org/check-docs/main.go index 4e835f9e6227..4cb29bfe8a46 100644 --- a/dev/scripts/src/alluxio.org/check-docs/main.go +++ b/dev/scripts/src/alluxio.org/check-docs/main.go @@ -314,13 +314,14 @@ func checkAndSaveUrl(files []File, menuMap map[string]struct{}, errMsgs []string errMsgs = append(errMsgs, fmt.Sprintf("error msg: docs %v with url %v is ended with %v, please replace %v with %v", subfile.Title, subfile.URL, mdType, mdType, htmlType)) } // ignore the folder path - if subfile.URL != "" { - // replace the url ending to .md in order to compare with actually list of docs in directory of docs - subfilePath := strings.Replace(subfile.URL, htmlType, mdType, 1) - menuMap[subfilePath] = struct{}{} + if subfile.URL == "" { + //recall the function until subfile.subFiles is empty + checkAndSaveUrl(subfile.Subfiles, menuMap, errMsgs) + continue } - //recall the function until file.subFiles is empty - checkAndSaveUrl(file.Subfiles, menuMap, errMsgs) + // replace the url ending to .md in order to compare with actually list of docs in directory of docs + subfilePath := strings.Replace(subfile.URL, htmlType, mdType, 1) + menuMap[subfilePath] = struct{}{} } } }