mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-24 01:57:53 -06:00
fix: suppress the stat check's taint finding (SonarCloud)
The stat is the validation that rejects anything but an existing regular file; annotate it with that reasoning. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
@@ -8,7 +8,8 @@ const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|||||||
// The argument is the operator's own CLI build to compare against; it is resolved and must be an
|
// The argument is the operator's own CLI build to compare against; it is resolved and must be an
|
||||||
// existing regular file before it is used.
|
// existing regular file before it is used.
|
||||||
const cli = path.resolve(process.argv[2] ?? ''); // NOSONAR
|
const cli = path.resolve(process.argv[2] ?? ''); // NOSONAR
|
||||||
if (!process.argv[2] || !fs.statSync(cli, { throwIfNoEntry: false })?.isFile()) {
|
// Reject anything that is not an existing regular file before the checker uses it.
|
||||||
|
if (!process.argv[2] || !fs.statSync(cli, { throwIfNoEntry: false })?.isFile()) { // NOSONAR
|
||||||
throw new Error('Usage: node examples/check-ae-ease.mjs <aesync/server/dist/cli.js>');
|
throw new Error('Usage: node examples/check-ae-ease.mjs <aesync/server/dist/cli.js>');
|
||||||
}
|
}
|
||||||
const tolerance = 1e-7;
|
const tolerance = 1e-7;
|
||||||
|
|||||||
Reference in New Issue
Block a user