Use more explicit checks on .length for readability

This commit is contained in:
Henry Mercer
2025-08-05 17:55:50 +01:00
parent e682065360
commit ea05bf27b6
15 changed files with 15 additions and 15 deletions

2
lib/upload-lib.js generated
View File

@@ -387,7 +387,7 @@ function validateSarifFileSchema(sarif, sarifFilePath, logger) {
for (const warning of warnings) {
logger.info(`Warning: '${warning.instance}' is not a valid URI in '${warning.property}'.`);
}
if (errors.length) {
if (errors.length > 0) {
// Output the more verbose error messages in groups as these may be very large.
for (const error of errors) {
logger.startGroup(`Error details: ${error.stack}`);