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
94
94
public HashSet < AssemblyLookupLocation > Restore ( )
95
95
{
96
96
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
+
98
101
try
99
102
{
100
103
if ( checkNugetFeedResponsiveness && ! CheckFeeds ( ) )
Original file line number Diff line number Diff line change @@ -20,17 +20,9 @@ public RazorGenerator(
20
20
21
21
protected override bool IsEnabled ( )
22
22
{
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 ;
34
26
}
35
27
36
28
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()
29
29
return threads ;
30
30
}
31
31
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
+
32
45
public static bool GetBoolean ( string name )
33
46
{
34
47
var env = Environment . GetEnvironmentVariable ( name ) ;
Original file line number Diff line number Diff line change 2
2
from diagnostics_test_utils import *
3
3
import os
4
4
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
6
6
os .environ ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_NUGET_FEEDS_CHECK_TIMEOUT" ] = "1" # 1ms, the GET request should fail with such short timeout
7
7
os .environ ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_NUGET_FEEDS_CHECK_LIMIT" ] = "1" # Limit the count of checks to 1
8
8
os .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