mirror of
https://github.com/github/codeql-action.git
synced 2025-12-24 08:10:06 +08:00
Use more explicit checks on .length for readability
This commit is contained in:
2
lib/upload-lib.js
generated
2
lib/upload-lib.js
generated
@@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user