@@ -46,6 +46,8 @@ type SfgeExecuteOptions = SfgeWrapperOptions & {
4646 ruleThreadCount ?: number ;
4747 ruleThreadTimeout ?: number ;
4848 ruleDisableWarningViolation ?: boolean ;
49+ enablecaching ?: boolean ;
50+ cachepath ?: string ;
4951}
5052
5153type SfgeTarget = {
@@ -57,6 +59,8 @@ type SfgeInput = {
5759 targets : SfgeTarget [ ] ;
5860 projectDirs : string [ ] ;
5961 rulesToRun : string [ ] ;
62+ enablecaching ?: boolean ;
63+ cachepath ?: string ;
6064} ;
6165
6266class SfgeSpinnerManager extends AsyncCreatable implements SpinnerManager {
@@ -209,6 +213,8 @@ export class SfgeExecuteWrapper extends AbstractSfgeWrapper {
209213 private ruleThreadCount : number ;
210214 private ruleThreadTimeout : number ;
211215 private ruleDisableWarningViolation : boolean ;
216+ private enablecaching : boolean ;
217+ private cachepath : string ;
212218
213219 constructor ( options : SfgeExecuteOptions ) {
214220 super ( options ) ;
@@ -218,6 +224,8 @@ export class SfgeExecuteWrapper extends AbstractSfgeWrapper {
218224 this . ruleThreadCount = options . ruleThreadCount ;
219225 this . ruleThreadTimeout = options . ruleThreadTimeout ;
220226 this . ruleDisableWarningViolation = options . ruleDisableWarningViolation ;
227+ this . enablecaching = options . enablecaching ;
228+ this . cachepath = options . cachepath ;
221229 }
222230
223231 protected getSupplementalFlags ( ) : string [ ] {
@@ -231,6 +239,12 @@ export class SfgeExecuteWrapper extends AbstractSfgeWrapper {
231239 if ( this . ruleDisableWarningViolation != null ) {
232240 flags . push ( `-DSFGE_RULE_DISABLE_WARNING_VIOLATION=${ this . ruleDisableWarningViolation . toString ( ) } ` ) ;
233241 }
242+ if ( this . enablecaching != null && this . enablecaching ) {
243+ flags . push ( `-DSFGE_DISABLE_CACHING=false` ) ;
244+ }
245+ if ( this . cachepath != null ) {
246+ flags . push ( `-DSFGE_FILES_TO_ENTRIES_CACHE_LOCATION=${ this . cachepath } ` ) ;
247+ }
234248 return flags ;
235249 }
236250
@@ -291,7 +305,9 @@ export class SfgeExecuteWrapper extends AbstractSfgeWrapper {
291305 pathExpLimit : sfgeConfig . pathexplimit ,
292306 ruleThreadCount : sfgeConfig . ruleThreadCount ,
293307 ruleThreadTimeout : sfgeConfig . ruleThreadTimeout ,
294- ruleDisableWarningViolation : sfgeConfig . ruleDisableWarningViolation
308+ ruleDisableWarningViolation : sfgeConfig . ruleDisableWarningViolation ,
309+ cachepath : sfgeConfig . cachepath ,
310+ enablecaching : sfgeConfig . enablecaching
295311 } ) ;
296312 return wrapper . execute ( ) ;
297313 }
0 commit comments