Skip to content

Commit

Permalink
feat(securityCheck): Improve security check progress reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
yamadashy committed Oct 1, 2024
1 parent beace47 commit 899ce16
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/core/security/securityCheckRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ export const runSecurityCheck = async (
async (rawFile, index) => {
const secretLintResult = await runSecretLint(rawFile.path, rawFile.content, secretLintConfig);

progressCallback(`Running security check... (${index + 1}/${rawFiles.length}) ${pc.dim(rawFile.path)}`);

// Sleep for a short time to prevent blocking the event loop
await sleep(1);

if (secretLintResult.messages.length > 0) {
return {
filePath: rawFile.path,
messages: secretLintResult.messages.map((message) => message.message),
};
}

progressCallback(`Running security check... (${index + 1}/${rawFiles.length}) ${pc.dim(rawFile.path)}`);

// Sleep for a short time to prevent blocking the event loop
await sleep(1);

return null;
},
{
Expand Down

0 comments on commit 899ce16

Please sign in to comment.