fix: log schema names correctly, do not log unmatched files
This commit is contained in:
parent
d5e321039c
commit
02ccffda6b
|
@ -132,7 +132,7 @@ export async function loadRulePaths(paths: Array<string>, ctx: VisitorContext):
|
||||||
.filter((name) => name[0] !== '.')
|
.filter((name) => name[0] !== '.')
|
||||||
.filter((name) => match.match(name));
|
.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);
|
const pathRules = await loadRuleFiles(files, ctx);
|
||||||
rules.push(...pathRules);
|
rules.push(...pathRules);
|
||||||
|
|
|
@ -51,8 +51,8 @@ export class VisitorContext implements VisitorContextOptions, VisitorResult {
|
||||||
|
|
||||||
public addSchema(name: string, schema: any): void {
|
public addSchema(name: string, schema: any): void {
|
||||||
this.logger.debug({
|
this.logger.debug({
|
||||||
name,
|
|
||||||
schema,
|
schema,
|
||||||
|
schemaName: name,
|
||||||
}, 'adding ajv schema');
|
}, 'adding ajv schema');
|
||||||
|
|
||||||
this.ajv.addSchema({
|
this.ajv.addSchema({
|
||||||
|
|
|
@ -96,7 +96,6 @@ describeLeaks('load rule path helper', async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
itLeaks('should recursively load rule files', async () => {
|
itLeaks('should recursively load rule files', async () => {
|
||||||
|
|
||||||
mockFS({
|
mockFS({
|
||||||
test: {
|
test: {
|
||||||
'bar-dir': {
|
'bar-dir': {
|
||||||
|
|
Loading…
Reference in New Issue