refactor(dev-infra): fix lint warnings for Pullapprove-related scripts (#36287)
The `dev-infra` scripts were added to the list of sources that should be verified with clang (b07b6edc2a
), but the Pullapprove-related scripts that were merged before (83e4a76afa
) doesn't pass these checks. This commit updates a couple scripts to have a proper formatting. PR Close #36287
This commit is contained in:
parent
5cee709266
commit
c94a33c525
|
@ -72,12 +72,16 @@ export class PullApproveGroup {
|
|||
} else if (condition.match(CONDITION_TYPES.ATTR_LENGTH)) {
|
||||
// Currently a noop as we do not take any action on this condition type.
|
||||
} else {
|
||||
const errMessage = `Unrecognized condition found, unable to parse the following condition: \n\n` +
|
||||
const errMessage =
|
||||
`Unrecognized condition found, unable to parse the following condition: \n\n` +
|
||||
`From the [${groupName}] group:\n` +
|
||||
` - ${condition}` +
|
||||
`\n\n` +
|
||||
`Known condition regexs:\n` +
|
||||
`${Object.entries(CONDITION_TYPES).map(([k, v]) => ` ${k} - ${v}`).join('\n')}` +
|
||||
`${Object.entries(CONDITION_TYPES).map(([k, v]) => ` ${k} - $ {
|
||||
v
|
||||
}
|
||||
`).join('\n')}` +
|
||||
`\n\n`;
|
||||
console.error(errMessage);
|
||||
process.exit(1);
|
||||
|
|
|
@ -9,10 +9,11 @@ import {readFileSync} from 'fs';
|
|||
import * as path from 'path';
|
||||
import {cd, exec, set} from 'shelljs';
|
||||
|
||||
import {getRepoBaseDir} from '../utils/config';
|
||||
|
||||
import {PullApproveGroup} from './group';
|
||||
import {logGroup, logHeader} from './logging';
|
||||
import {parsePullApproveYaml} from './parse-yaml';
|
||||
import {getRepoBaseDir} from '../utils/config';
|
||||
|
||||
export function verify() {
|
||||
// Exit early on shelljs errors
|
||||
|
|
Loading…
Reference in New Issue