File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -554,7 +554,7 @@ function handleOpenProjectCommand(command: OpenProjectCommand) {
554
554
let program = project . program ;
555
555
let typeChecker = program . getTypeChecker ( ) ;
556
556
557
- let shouldReportDiagnostics = getEnvironmentVariable ( "SEMMLE_TYPESCRIPT_REPORT_DIAGNOSTICS" , v => JSON . parse ( v . toLowerCase ( ) ) , false ) ;
557
+ let shouldReportDiagnostics = getEnvironmentVariable ( "SEMMLE_TYPESCRIPT_REPORT_DIAGNOSTICS" , v => v . trim ( ) . toLowerCase ( ) === "true" , false ) ;
558
558
let diagnostics = shouldReportDiagnostics
559
559
? program . getSemanticDiagnostics ( ) . filter ( d => d . category === ts . DiagnosticCategory . Error )
560
560
: [ ] ;
@@ -807,8 +807,8 @@ function handleGetMetadataCommand(command: GetMetadataCommand) {
807
807
808
808
function reset ( ) {
809
809
state = new State ( ) ;
810
- state . typeTable . restrictedExpansion = getEnvironmentVariable ( "SEMMLE_TYPESCRIPT_NO_EXPANSION" , v => JSON . parse ( v . toLowerCase ( ) ) , true ) ;
811
- state . typeTable . skipExtractingTypes = getEnvironmentVariable ( "CODEQL_EXTRACTOR_JAVASCRIPT_OPTION_SKIP_TYPES" , v => JSON . parse ( v . toLowerCase ( ) ) , false ) ;
810
+ state . typeTable . restrictedExpansion = getEnvironmentVariable ( "SEMMLE_TYPESCRIPT_NO_EXPANSION" , v => v . trim ( ) . toLowerCase ( ) === "true" , true ) ;
811
+ state . typeTable . skipExtractingTypes = getEnvironmentVariable ( "CODEQL_EXTRACTOR_JAVASCRIPT_OPTION_SKIP_TYPES" , v => v . trim ( ) . toLowerCase ( ) === "true" , false ) ;
812
812
}
813
813
814
814
function getEnvironmentVariable < T > ( name : string , parse : ( x : string ) => T , defaultValue : T ) {
You can’t perform that action at this time.
0 commit comments