Skip to content

Commit

Permalink
dev: better logging (#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
tianhaoz95 authored Jan 9, 2020
1 parent e9287c8 commit c798fb3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c798fb3

Please sign in to comment.