File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ async function main(): Promise<void> {
9191 const logErrorFilePath = argv . logError as string | undefined ;
9292 const logDiagnosticFilePath = argv . logDiagnostic as string | undefined ;
9393 const strict = argv . strict as boolean ?? false ;
94-
94+ let logDexFilePath ;
9595 // Schemevalidation and Spectral Document creation ----------
9696 let apiSpecDocument : SpectralDocument ;
9797 let parseResult : ParseResult ;
@@ -196,6 +196,7 @@ async function main(): Promise<void> {
196196 outputFilePath : argv . dex ,
197197 } ) ;
198198 reportHandler . generateReportDocument ( customDiagnostic ) ;
199+ logDexFilePath = reportHandler . diagnosticInformation . outputFilePath ;
199200 } catch ( dexError : any ) {
200201 logErrorToFile ( dexError ) ;
201202 console . error ( chalk . red ( 'Misslyckades att skriva till excelfilen!' ) ) ;
@@ -332,6 +333,10 @@ async function main(): Promise<void> {
332333 result . forEach ( ( item ) => console . log ( formatLintingResult ( item ) ) ) ;
333334 }
334335 }
336+ if ( logDexFilePath != undefined ) {
337+ console . log ( chalk . green ( `Skriver diagnostiseringsinformation i excelformat från RAP-LP till ${ logDexFilePath } ` ) ) ;
338+
339+ }
335340 } catch ( spectralError : any ) {
336341 logErrorToFile ( spectralError ) ; // Log stack
337342 console . error (
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ export class ExcelReportProcessor {
6868 private parser = new XMLParser ( { ignoreAttributes : false } ) ;
6969 private builder = new XMLBuilder ( { ignoreAttributes : false } ) ;
7070 private zip : AdmZip ;
71+
7172 constructor ( config ?: Partial < ExcelTemplateConfig > ) {
7273 const isPresent = ( x ?: string ) : x is string => {
7374 return x != null && x !== '' ;
@@ -88,6 +89,9 @@ export class ExcelReportProcessor {
8889
8990 this . zip = new AdmZip ( this . config . reportTemplatePath ) ;
9091 }
92+ public get diagnosticInformation ( ) : ExcelTemplateConfig {
93+ return this . config ;
94+ }
9195
9296 public generateReportDocument ( result : RapLPDiagnostic ) {
9397 // Convert the result Raport to map with Rule name as key and status as value.
@@ -114,6 +118,7 @@ export class ExcelReportProcessor {
114118
115119 // Persist and write the output file.
116120 this . persistUpdates ( this . config . outputFilePath ) ;
121+ console . log ( "THIS IS PATH: " + this . config . outputFilePath ) ;
117122 }
118123
119124 /**
You can’t perform that action at this time.
0 commit comments