1
0
Fork 0

fix: log schema names correctly, do not log unmatched files

This commit is contained in:
ssube 2019-11-12 07:59:44 -06:00
parent d5e321039c
commit 02ccffda6b
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
3 changed files with 2 additions and 3 deletions

View File

@ -132,7 +132,7 @@ export async function loadRulePaths(paths: Array<string>, ctx: VisitorContext):
.filter((name) => name[0] !== '.')
.filter((name) => match.match(name));
ctx.logger.debug({ allFiles, files }, 'path matched files');
ctx.logger.debug({ files }, 'path matched rule files');
const pathRules = await loadRuleFiles(files, ctx);
rules.push(...pathRules);

View File

@ -51,8 +51,8 @@ export class VisitorContext implements VisitorContextOptions, VisitorResult {
public addSchema(name: string, schema: any): void {
this.logger.debug({
name,
schema,
schemaName: name,
}, 'adding ajv schema');
this.ajv.addSchema({

View File

@ -96,7 +96,6 @@ describeLeaks('load rule path helper', async () => {
});
itLeaks('should recursively load rule files', async () => {
mockFS({
test: {
'bar-dir': {