You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run this CLI command npx spectral lint --show-unmatched-globs globReturningEmptyArray
echo $? >> 0
Expected behaviour
In CI environments it would be preferred if the --show-unmatched-globs returned an exitCode > 0 so you don't get any "false" positive tests
The text was updated successfully, but these errors were encountered:
Describe the bug
Right now the
show-unmatched-globs
only logs a message if a spec isn't found using a glob. It would be nice if it would change the exitCode as well (process.exitCode = 1;
).https://github.com/stoplightio/spectral/blob/develop/src/cli/services/linter/linter.ts#L73
Maybe the yarg option
--show-unmatched-globs
could be made to take a string and use that to change exit code if that is behaviour the user wants--show-unmatched-globs=empty/info/warn
>> exitCode=0--show-unmatched-globs=error
>> exitCode=1To Reproduce
npx spectral lint --show-unmatched-globs globReturningEmptyArray
echo $?
>> 0Expected behaviour
In CI environments it would be preferred if the
--show-unmatched-globs
returned an exitCode > 0 so you don't get any "false" positive testsThe text was updated successfully, but these errors were encountered: