If no files are found and no errors are detected but the --outputjson command-line option is used, a json report should still be issued. This addresses https://github.com/microsoft/pyright/issues/4723.

This commit is contained in:
Eric Traut 2023-03-03 00:24:06 -07:00
parent 659fdfab75
commit 3035662636

View File

@ -335,7 +335,7 @@ async function processArgs(): Promise<ExitStatus> {
}
let errorCount = 0;
if (results.diagnostics.length > 0 && !args.createstub && !args['verifytypes']) {
if (!args.createstub && !args.verifytypes) {
if (args.outputjson) {
const report = reportDiagnosticsAsJson(
results.diagnostics,