@@ -4,6 +4,7 @@ import pluralize from 'pluralize';
4
4
import { ZodError } from 'zod' ;
5
5
6
6
import { check } from '../linter' ;
7
+ import { SignaleRenderer } from '../utils/listr' ;
7
8
import { LoadLocalConfigurationTask } from './diff.command' ;
8
9
import { BaseCommand } from './helper' ;
9
10
@@ -28,7 +29,13 @@ export const LintTask = (): ListrTask<{ local: ADCSDK.Configuration }> => ({
28
29
29
30
// normal case
30
31
const resourceType = pluralize . singular ( error . path [ 0 ] as string ) ;
31
- const resourceName = ctx . local [ error . path [ 0 ] ] [ error . path [ 1 ] ] . name ;
32
+ const resource = ctx . local [ error . path [ 0 ] ] [ error . path [ 1 ] ] ;
33
+ const resourceName =
34
+ resourceType === 'ssl'
35
+ ? resource . snis
36
+ : resourceType === 'consumer'
37
+ ? resource . username
38
+ : resource . name ;
32
39
err += `#${ idx + 1 } ${
33
40
error . message
34
41
} at ${ resourceType } : "${ resourceName } ", field: "${ (
@@ -59,10 +66,13 @@ export const LintCommand = new BaseCommand('lint')
59
66
. action ( async ( ) => {
60
67
const opts = LintCommand . optsWithGlobals ( ) ;
61
68
62
- const tasks = new Listr ( [
63
- LoadLocalConfigurationTask ( opts . file , { } ) ,
64
- LintTask ( ) ,
65
- ] ) ;
69
+ const tasks = new Listr (
70
+ [ LoadLocalConfigurationTask ( opts . file , { } ) , LintTask ( ) ] ,
71
+ {
72
+ renderer : SignaleRenderer ,
73
+ rendererOptions : { verbose : opts . verbose } ,
74
+ } ,
75
+ ) ;
66
76
67
77
try {
68
78
await tasks . run ( ) ;
0 commit comments