MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / runMetaRulesAsync

Function runMetaRulesAsync

apps/api/scripts/lint-meta/runner.ts:10–23  ·  view source on GitHub ↗
(
  rules: readonly IMetaRule[],
  ctx: IMetaContext
)

Source from the content-addressed store, hash-verified

8}
9
10export async function runMetaRulesAsync(
11 rules: readonly IMetaRule[],
12 ctx: IMetaContext
13): Promise<IViolation[]> {
14 const results: IViolation[][] = [];
15
16 for (const rule of rules) {
17 if (rule.runAsync !== undefined) {
18 results.push(await rule.runAsync(ctx));
19 }
20 }
21
22 return results.flat();
23}
24
25export function printRuleCatalog(rules: readonly IMetaRule[]): void {
26 console.log("id\tcategory\tci-critical\tdescription");

Callers 1

mainFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected