File tree Expand file tree Collapse file tree 4 files changed +21
-13
lines changed
ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error_timeout Expand file tree Collapse file tree 4 files changed +21
-13
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,10 @@ public static DirectoryInfo[] GetOrderedPackageVersionSubDirectories(string pack
9494 public HashSet < AssemblyLookupLocation > Restore ( )
9595 {
9696 var assemblyLookupLocations = new HashSet < AssemblyLookupLocation > ( ) ;
97- var checkNugetFeedResponsiveness = EnvironmentVariables . GetBoolean ( EnvironmentVariableNames . CheckNugetFeedResponsiveness ) ;
97+ var checkNugetFeedResponsiveness = EnvironmentVariables . GetBooleanOptOut ( EnvironmentVariableNames . CheckNugetFeedResponsiveness ) ;
98+ logger . LogInfo ( $ "Checking NuGet feed responsiveness: { checkNugetFeedResponsiveness } ") ;
99+ compilationInfoContainer . CompilationInfos . Add ( ( "NuGet feed responsiveness checked" , checkNugetFeedResponsiveness ? "1" : "0" ) ) ;
100+
98101 try
99102 {
100103 if ( checkNugetFeedResponsiveness && ! CheckFeeds ( ) )
Original file line number Diff line number Diff line change @@ -20,17 +20,9 @@ public RazorGenerator(
2020
2121 protected override bool IsEnabled ( )
2222 {
23- var webViewExtractionOption = Environment . GetEnvironmentVariable ( EnvironmentVariableNames . WebViewGeneration ) ;
24- if ( webViewExtractionOption == null ||
25- bool . TryParse ( webViewExtractionOption , out var shouldExtractWebViews ) &&
26- shouldExtractWebViews )
27- {
28- compilationInfoContainer . CompilationInfos . Add ( ( "WebView extraction enabled" , "1" ) ) ;
29- return true ;
30- }
31-
32- compilationInfoContainer . CompilationInfos . Add ( ( "WebView extraction enabled" , "0" ) ) ;
33- return false ;
23+ var webViewExtractionOption = EnvironmentVariables . GetBooleanOptOut ( EnvironmentVariableNames . WebViewGeneration ) ;
24+ compilationInfoContainer . CompilationInfos . Add ( ( "WebView extraction enabled" , webViewExtractionOption ? "1" : "0" ) ) ;
25+ return webViewExtractionOption ;
3426 }
3527
3628 protected override ICollection < string > AdditionalFiles => fileProvider . RazorViews ;
Original file line number Diff line number Diff line change @@ -29,6 +29,19 @@ public static int GetDefaultNumberOfThreads()
2929 return threads ;
3030 }
3131
32+ public static bool GetBooleanOptOut ( string name )
33+ {
34+ var env = Environment . GetEnvironmentVariable ( name ) ;
35+ if ( env == null ||
36+ bool . TryParse ( env , out var value ) &&
37+ value )
38+ {
39+ return true ;
40+ }
41+
42+ return false ;
43+ }
44+
3245 public static bool GetBoolean ( string name )
3346 {
3447 var env = Environment . GetEnvironmentVariable ( name ) ;
Original file line number Diff line number Diff line change 22from diagnostics_test_utils import *
33import os
44
5- os .environ ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_NUGET_FEEDS_CHECK" ] = "true" # Enable NuGet feed check
5+ # os.environ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_NUGET_FEEDS_CHECK"] = "true" # Nuget feed check is enabled by default
66os .environ ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_NUGET_FEEDS_CHECK_TIMEOUT" ] = "1" # 1ms, the GET request should fail with such short timeout
77os .environ ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_NUGET_FEEDS_CHECK_LIMIT" ] = "1" # Limit the count of checks to 1
88os .environ ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_NUGET_FEEDS_CHECK_EXCLUDED" ] = "https://abc.de:8000/packages/" # Exclude this feed from check
You can’t perform that action at this time.
0 commit comments