From c798fb380d5dcaebabf1648931d42ae67351400e Mon Sep 17 00:00:00 2001 From: Tianhao Zhou Date: Thu, 9 Jan 2020 00:02:21 -0800 Subject: [PATCH] dev: better logging (#282) --- lib/util.js | 5 +++-- src/util.ts | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/util.js b/lib/util.js index 09480fa5d..f9c056d53 100644 --- a/lib/util.js +++ b/lib/util.js @@ -330,12 +330,13 @@ function getLintFileList(workspaceDir) { let ignoreList = getReadmeIgnoreList(readmeIgnoreFilename); rrlog("ignore list found: " + JSON.stringify(ignoreList)); const rawWorkspaceFiles = listFiles(workspaceDir); - rrlog("rawWorkspaceFiles size: " + rawWorkspaceFiles.length.toString()); + core.info("workspace file count: " + rawWorkspaceFiles.length.toString()); if (ignoreList.length === 0) { // match with empty ignorelist will return empty list, so just return - rrlog("ignorelist is empty, proceed with all markdown files"); + core.info("ignorelist is empty, proceed with all markdown files"); ignoreList = ["!**/node_modules/**/*"]; } + core.info("ignore file list: " + ignoreList.toString()); const workspaceFiles = ignoreFiles(rawWorkspaceFiles, ignoreList); rrlog("workspaceFiles size: " + workspaceFiles.length.toString()); return workspaceFiles; diff --git a/src/util.ts b/src/util.ts index 1cc439b6a..1d2099775 100644 --- a/src/util.ts +++ b/src/util.ts @@ -309,12 +309,13 @@ export function getLintFileList(workspaceDir: string): string[] { let ignoreList = getReadmeIgnoreList(readmeIgnoreFilename); rrlog("ignore list found: " + JSON.stringify(ignoreList)); const rawWorkspaceFiles = listFiles(workspaceDir); - rrlog("rawWorkspaceFiles size: " + rawWorkspaceFiles.length.toString()); + core.info("workspace file count: " + rawWorkspaceFiles.length.toString()); if (ignoreList.length === 0) { // match with empty ignorelist will return empty list, so just return - rrlog("ignorelist is empty, proceed with all markdown files"); + core.info("ignorelist is empty, proceed with all markdown files"); ignoreList = ["!**/node_modules/**/*"]; } + core.info("ignore file list: " + ignoreList.toString()); const workspaceFiles = ignoreFiles(rawWorkspaceFiles, ignoreList); rrlog("workspaceFiles size: " + workspaceFiles.length.toString()); return workspaceFiles;