feat(dev-infra): add a command to verify NgBot YAML config syntax (#39071)
This commit adds a new command to the `ng-dev` suite, which verifies that the NgBot YAML config is
correct. It also adds this command to the `lint` CircleCI job so that we execute this check while
running CI.
This should help prevent syntax errors similar to the one introduced in:
393ce5574b
PR Close #39071
This commit is contained in:

committed by
Joey Perrott

parent
6205ed0fcc
commit
4bce21358d
19
dev-infra/ngbot/cli.ts
Normal file
19
dev-infra/ngbot/cli.ts
Normal file
@ -0,0 +1,19 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
import * as yargs from 'yargs';
|
||||
import {verify} from './verify';
|
||||
|
||||
/** Build the parser for the NgBot commands. */
|
||||
export function buildNgbotParser(localYargs: yargs.Argv) {
|
||||
return localYargs.help().strict().demandCommand().command(
|
||||
'verify', 'Verify the NgBot config', {}, () => verify());
|
||||
}
|
||||
|
||||
if (require.main === module) {
|
||||
buildNgbotParser(yargs).parse();
|
||||
}
|
Reference in New Issue
Block a user