12
12
13
13
namespace Turkey
14
14
{
15
+ #pragma warning disable CA1052 // Static holder types should be Static or NotInheritable
15
16
public class Program
17
+ #pragma warning restore CA1052 // Static holder types should be Static or NotInheritable
16
18
{
17
19
public static readonly Option < bool > verboseOption = new Option < bool > (
18
20
new string [ ] { "--verbose" , "-v" } ,
@@ -118,7 +120,7 @@ public static async Task<int> Run(string testRoot,
118
120
119
121
Version packageVersion = runtimeVersion ;
120
122
string nuGetConfig = await GenerateNuGetConfigIfNeededAsync ( additionalFeed , packageVersion ,
121
- useSourceBuildNuGetConfig : false ) ;
123
+ useSourceBuildNuGetConfig : false ) . ConfigureAwait ( false ) ;
122
124
if ( verbose && nuGetConfig != null )
123
125
{
124
126
Console . WriteLine ( "Using nuget.config: " ) ;
@@ -132,7 +134,7 @@ public static async Task<int> Run(string testRoot,
132
134
verboseOutput : verbose ,
133
135
nuGetConfig : nuGetConfig ) ;
134
136
135
- var results = await runner . ScanAndRunAsync ( testOutputs , logDir . FullName , defaultTimeout ) ;
137
+ var results = await runner . ScanAndRunAsync ( testOutputs , logDir . FullName , defaultTimeout ) . ConfigureAwait ( false ) ;
136
138
137
139
int exitCode = ( results . Failed == 0 ) ? 0 : 1 ;
138
140
return exitCode ;
@@ -157,7 +159,7 @@ public static async Task<string> GenerateNuGetConfigIfNeededAsync(string additio
157
159
{
158
160
try
159
161
{
160
- nugetConfig = await sourceBuild . GetNuGetConfigAsync ( netCoreAppVersion ) ;
162
+ nugetConfig = await sourceBuild . GetNuGetConfigAsync ( netCoreAppVersion ) . ConfigureAwait ( false ) ;
161
163
}
162
164
catch ( HttpRequestException exception )
163
165
{
@@ -173,14 +175,16 @@ public static async Task<string> GenerateNuGetConfigIfNeededAsync(string additio
173
175
// if the nugetConfig has a <clear/> element that removes
174
176
// it.
175
177
urls . Add ( "https://api.nuget.org/v3/index.json" ) ;
176
- return await nuget . GenerateNuGetConfig ( urls , nugetConfig ) ;
178
+ return await nuget . GenerateNuGetConfig ( urls , nugetConfig ) . ConfigureAwait ( false ) ;
177
179
}
178
180
}
179
181
180
182
return null ;
181
183
}
182
184
185
+ #pragma warning disable CA1801 // Remove unused parameter
183
186
public static IReadOnlySet < string > CreateTraits ( Version runtimeVersion , Version sdkVersion , List < string > rids , bool isMonoRuntime , IEnumerable < string > additionalTraits )
187
+ #pragma warning restore CA1801 // Remove unused parameter
184
188
{
185
189
var traits = new HashSet < string > ( StringComparer . OrdinalIgnoreCase ) ;
186
190
@@ -199,7 +203,9 @@ public static IReadOnlySet<string> CreateTraits(Version runtimeVersion, Version
199
203
}
200
204
201
205
// Add 'arch=' trait.
206
+ #pragma warning disable CA1308 // Normalize strings to uppercase
202
207
string arch = RuntimeInformation . OSArchitecture . ToString ( ) . ToLowerInvariant ( ) ;
208
+ #pragma warning restore CA1308 // Normalize strings to uppercase
203
209
traits . Add ( $ "arch={ arch } ") ;
204
210
205
211
// Add 'runtime=' trait.
@@ -231,7 +237,7 @@ static async Task<int> Main(string[] args)
231
237
rootCommand . AddOption ( traitOption ) ;
232
238
rootCommand . AddOption ( timeoutOption ) ;
233
239
234
- return await rootCommand . InvokeAsync ( args ) ;
240
+ return await rootCommand . InvokeAsync ( args ) . ConfigureAwait ( false ) ;
235
241
}
236
242
}
237
- }
243
+ }
0 commit comments