make checker fail on errors
This commit is contained in:
Родитель
68c3b04dcb
Коммит
6489c06446
|
@ -8,7 +8,6 @@ import { Host, startSession } from '@azure-tools/autorest-extension-base';
|
|||
import { codeModelSchema, CodeModel } from '@azure-tools/codemodel';
|
||||
import { Checker } from './checker';
|
||||
|
||||
|
||||
export async function processRequest(host: Host) {
|
||||
const debug = await host.GetValue('debug') || false;
|
||||
|
||||
|
@ -21,6 +20,9 @@ export async function processRequest(host: Host) {
|
|||
|
||||
// go!
|
||||
const result = plugin.process();
|
||||
if (session.errorCount > 0) {
|
||||
throw new Error(`${session.errorCount} errors occured -- cannot continue.`);
|
||||
}
|
||||
|
||||
// output the model to the pipeline
|
||||
if (options['emit-yaml-tags'] !== false) {
|
||||
|
|
|
@ -224,7 +224,7 @@ pipeline:
|
|||
input: modelerfour/pre-namer/new-transform
|
||||
|
||||
modelerfour/identity:
|
||||
input: modelerfour/pre-namer/new-transform
|
||||
input: modelerfour/checker
|
||||
|
||||
modelerfour/emitter:
|
||||
input: modelerfour/identity
|
||||
|
|
Загрузка…
Ссылка в новой задаче