File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -53,8 +53,15 @@ export function jsonCheckTaskFactory(definition: JSONCheckDefinition) {
5353 for ( const file of files ) {
5454 setTimeout ( ( ) => {
5555 let json ;
56+ let result : any [ ] ;
5657 try {
5758 json = JSON . parse ( stripJsonComments ( fs . readFile ( file ) ) ) ;
59+ result = JSONPath ( {
60+ path : jsonPropertyPath ?. startsWith ( '$' )
61+ ? jsonPropertyPath
62+ : `$${ jsonPropertyPath } ` ,
63+ json,
64+ } ) ;
5865 } catch ( err : any ) {
5966 errors . push (
6067 new Error ( `[json] "${ name } " - ${ file } - ${ err . message } ` )
@@ -69,13 +76,6 @@ export function jsonCheckTaskFactory(definition: JSONCheckDefinition) {
6976 return ;
7077 }
7178
72- const result : any [ ] = JSONPath ( {
73- path : jsonPropertyPath ?. startsWith ( '$' )
74- ? jsonPropertyPath
75- : `$${ jsonPropertyPath } ` ,
76- json,
77- } ) ;
78-
7979 if ( result . length ) {
8080 matches . push ( {
8181 file,
You can’t perform that action at this time.
0 commit comments