@@ -93,39 +93,34 @@ export class StubEngine1 extends EngineApi.Engine {
9393 {
9494 name : "stub1RuleA" ,
9595 severityLevel : EngineApi . SeverityLevel . Low ,
96- type : EngineApi . RuleType . Standard ,
9796 tags : [ "Recommended" , "CodeStyle" ] ,
9897 description : "Some description for stub1RuleA" ,
9998 resourceUrls : [ "https://example.com/stub1RuleA" ]
10099 } ,
101100 {
102101 name : "stub1RuleB" ,
103102 severityLevel : EngineApi . SeverityLevel . High ,
104- type : EngineApi . RuleType . Standard ,
105103 tags : [ "Recommended" , "Security" ] ,
106104 description : "Some description for stub1RuleB" ,
107105 resourceUrls : [ "https://example.com/stub1RuleB" ]
108106 } ,
109107 {
110108 name : "stub1RuleC" ,
111109 severityLevel : EngineApi . SeverityLevel . Moderate ,
112- type : EngineApi . RuleType . Standard ,
113110 tags : [ "Recommended" , "Performance" , "Custom" ] ,
114111 description : "Some description for stub1RuleC" ,
115112 resourceUrls : [ "https://example.com/stub1RuleC" ]
116113 } ,
117114 {
118115 name : "stub1RuleD" ,
119116 severityLevel : EngineApi . SeverityLevel . Low ,
120- type : EngineApi . RuleType . Standard ,
121117 tags : [ "CodeStyle" ] ,
122118 description : "Some description for stub1RuleD" ,
123119 resourceUrls : [ "https://example.com/stub1RuleD" ]
124120 } ,
125121 {
126122 name : "stub1RuleE" ,
127123 severityLevel : EngineApi . SeverityLevel . Moderate ,
128- type : EngineApi . RuleType . Standard ,
129124 tags : [ "Performance" ] ,
130125 description : "Some description for stub1RuleE" ,
131126 resourceUrls : [ "https://example.com/stub1RuleE" , "https://example.com/stub1RuleE_2" ]
@@ -178,23 +173,20 @@ export class StubEngine2 extends EngineApi.Engine {
178173 {
179174 name : "stub2RuleA" ,
180175 severityLevel : EngineApi . SeverityLevel . Moderate ,
181- type : EngineApi . RuleType . DataFlow ,
182176 tags : [ "Recommended" , "Security" ] ,
183177 description : "Some description for stub2RuleA" ,
184178 resourceUrls : [ "https://example.com/stub2RuleA" ]
185179 } ,
186180 {
187181 name : "stub2RuleB" ,
188182 severityLevel : EngineApi . SeverityLevel . Low ,
189- type : EngineApi . RuleType . DataFlow ,
190183 tags : [ "Performance" , "Custom" ] ,
191184 description : "Some description for stub2RuleB" ,
192185 resourceUrls : [ "https://example.com/stub2RuleB" ]
193186 } ,
194187 {
195188 name : "stub2RuleC" ,
196189 severityLevel : EngineApi . SeverityLevel . High ,
197- type : EngineApi . RuleType . DataFlow ,
198190 tags : [ "Recommended" , "BestPractice" ] ,
199191 description : "Some description for stub2RuleC" ,
200192 resourceUrls : [ ] // Purposely putting in nothing here
@@ -267,7 +259,7 @@ abstract class BaseTimeableEngine extends EngineApi.Engine {
267259 private selectionWaitTime : number ;
268260 private executionWaitTime : number ;
269261
270- constructor ( config : EngineApi . ConfigObject ) {
262+ constructor ( _config : EngineApi . ConfigObject ) {
271263 super ( ) ;
272264 this . selectionWaitTime = 0 ;
273265 this . executionWaitTime = 0 ;
@@ -306,15 +298,14 @@ abstract class BaseTimeableEngine extends EngineApi.Engine {
306298 {
307299 name : "stub1RuleA" ,
308300 severityLevel : EngineApi . SeverityLevel . Low ,
309- type : EngineApi . RuleType . Standard ,
310301 tags : [ "Recommended" , "CodeStyle" ] ,
311302 description : "Some description for stub1RuleA" ,
312303 resourceUrls : [ "https://example.com/stub1RuleA" ]
313304 }
314305 ] ;
315306 }
316307
317- async runRules ( ruleNames : string [ ] , runOptions : EngineApi . RunOptions ) : Promise < EngineApi . EngineRunResults > {
308+ async runRules ( _ruleNames : string [ ] , _runOptions : EngineApi . RunOptions ) : Promise < EngineApi . EngineRunResults > {
318309 await new Promise ( res => setTimeout ( res , this . executionWaitTime ) ) ;
319310 this . emitEvent < EngineApi . RunRulesProgressEvent > ( {
320311 type : EngineApi . EventType . RunRulesProgressEvent ,
@@ -367,7 +358,7 @@ export class TimeableEngine2 extends BaseTimeableEngine {
367358export class EventConfigurableEngine1 extends EngineApi . Engine {
368359 private events : { logLevel : LogLevel , message : string } [ ] = [ ] ;
369360
370- constructor ( config : EngineApi . ConfigObject ) {
361+ constructor ( _config : EngineApi . ConfigObject ) {
371362 super ( ) ;
372363 }
373364
@@ -384,15 +375,14 @@ export class EventConfigurableEngine1 extends EngineApi.Engine {
384375 {
385376 name : "stub1RuleA" ,
386377 severityLevel : EngineApi . SeverityLevel . Low ,
387- type : EngineApi . RuleType . Standard ,
388378 tags : [ "Recommended" , "CodeStyle" ] ,
389379 description : "Some description for stub1RuleA" ,
390380 resourceUrls : [ "https://example.com/stub1RuleA" ]
391381 }
392382 ] ) ;
393383 }
394384
395- async runRules ( ruleNames : string [ ] , runOptions : EngineApi . RunOptions ) : Promise < EngineApi . EngineRunResults > {
385+ async runRules ( _ruleNames : string [ ] , _runOptions : EngineApi . RunOptions ) : Promise < EngineApi . EngineRunResults > {
396386 for ( const { logLevel, message} of this . events ) {
397387 this . emitEvent < EngineApi . LogEvent > ( {
398388 type : EngineApi . EventType . LogEvent ,
@@ -447,7 +437,6 @@ export class TargetDependentEngine1 extends EngineApi.Engine {
447437 return {
448438 name : `ruleFor${ fileOrFolder } ` ,
449439 severityLevel : EngineApi . SeverityLevel . Low ,
450- type : EngineApi . RuleType . Standard ,
451440 tags : [ "Recommended" ] ,
452441 description : `Rule synthesized for target "${ fileOrFolder } ` ,
453442 resourceUrls : [ `https://example.com/${ fileOrFolder } ` ]
0 commit comments