Skip to content

Commit 425afbf

Browse files
committed
AWS SDK for .NET v3.7.200.0 Release. Update code analyzers to target netstandard2.0.
1 parent d57fa16 commit 425afbf

File tree

1,780 files changed

+9678
-28318
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,780 files changed

+9678
-28318
lines changed

buildtools/build.proj

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,9 @@
187187
<Exec Command="dotnet build -c $(Configuration) --no-incremental %(ServiceName.FileName).sln /p:AWSKeyFile=$(CustomSnkFileLocation);SignAssembly=true;RunAnalyzersDuringBuild=$(RunAnalyzersDuringBuild);RuleSetFileForBuild=$(RuleSetFileForBuild)" WorkingDirectory="..\sdk\src\Services\%(ServiceName.FileName)"/>
188188
</Target>
189189

190-
191190
<Target Name="build-code-analysis" DependsOnTargets="restore-nuget;run-generator;build-custom-roslyn-analyzer;override-endpoints-file">
192-
<MSBuild Projects="..\sdk\AWSSDK.CodeAnalysis.sln"
193-
Targets="Clean;Build"
194-
Properties="Configuration=$(Configuration);AWSKeyFile=$(CustomSnkFileLocation)" />
191+
<Exec Command="dotnet clean -c $(Configuration) AWSSDK.CodeAnalysis.sln" WorkingDirectory="..\sdk"/>
192+
<Exec Command="dotnet build -c $(Configuration) AWSSDK.CodeAnalysis.sln /p:AWSKeyFile=$(CustomSnkFileLocation)" WorkingDirectory="..\sdk"/>
195193
</Target>
196194

197195
<Target Name="build-sdk-netstandard" DependsOnTargets="restore-nuget;run-generator;override-endpoints-file">
@@ -662,4 +660,10 @@
662660
CategoriesToIgnore="$(ExcludeTestCategories)"
663661
KeepTestResults="true" />
664662
</Target>
663+
664+
<Target Name="build-code-analysis-solution">
665+
<Exec Command="dotnet restore -f AWSSDK.CodeAnalysis.sln" WorkingDirectory="../sdk" />
666+
<Exec Command="dotnet clean -c $(Configuration) AWSSDK.CodeAnalysis.sln" WorkingDirectory="../sdk"/>
667+
<Exec Command="dotnet build -c $(Configuration) AWSSDK.CodeAnalysis.sln /p:AWSKeyFile=$(CustomSnkFileLocation)" WorkingDirectory="../sdk"/>
668+
</Target>
665669
</Project>

generator/ServiceClientGenerator/CommandLineParser.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,13 @@ class ArgDeclaration
222222
+ "The default behavior is to keep existing generated content."
223223
},
224224
new ArgDeclaration
225+
{
226+
OptionName = "createvsix",
227+
ShortName = "cvx",
228+
Parse = (arguments, argValue) => arguments.ParsedOptions.CreateCodeAnalysisVsixAssets = true,
229+
HelpText = "Creates a VSIX project and manifest for code analysis"
230+
},
231+
new ArgDeclaration
225232
{
226233
OptionName = "self.modelpath",
227234
Parse = (arguments, argValue) => arguments.ParsedOptions.SelfServiceModel = argValue,

generator/ServiceClientGeneratorLib/CodeAnalysisProjectCreator.cs

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using System.IO;
44
using System.Linq;
55
using System.Text;
6-
using System.Threading.Tasks;
76
using System.Xml;
87

98
using ServiceClientGenerator.Generators.CodeAnalysis;
@@ -15,10 +14,9 @@ public class CodeAnalysisProjectCreator
1514
public void Execute(string codeAnalysisRoot, ServiceConfiguration serviceConfiguration)
1615
{
1716
SetupProjectFile(codeAnalysisRoot, serviceConfiguration);
18-
SetupPackageConfigFile(codeAnalysisRoot, serviceConfiguration);
1917
GenerateAssemblyInfo(codeAnalysisRoot, serviceConfiguration);
20-
GenerateProperyValueRules(codeAnalysisRoot, serviceConfiguration);
21-
GenerateProperyValueAnalyzer(codeAnalysisRoot, serviceConfiguration);
18+
GeneratePropertyValueRules(codeAnalysisRoot, serviceConfiguration);
19+
GeneratePropertyValueAnalyzer(codeAnalysisRoot, serviceConfiguration);
2220
}
2321

2422
void SetupProjectFile(string codeAnalysisRoot, ServiceConfiguration serviceConfiguration)
@@ -56,21 +54,14 @@ void SetupProjectFile(string codeAnalysisRoot, ServiceConfiguration serviceConfi
5654
GeneratorDriver.WriteFile(codeAnalysisRoot, string.Empty, projectFilename, generatedContent);
5755
}
5856

59-
private void SetupPackageConfigFile(string codeAnalysisRoot, ServiceConfiguration serviceConfiguration)
60-
{
61-
CodeAnalysisPackages generator = new CodeAnalysisPackages();
62-
var generatedContent = generator.TransformText();
63-
GeneratorDriver.WriteFile(codeAnalysisRoot, string.Empty, "packages.config", generatedContent);
64-
}
65-
6657
private void GenerateAssemblyInfo(string codeAnalysisRoot, ServiceConfiguration serviceConfiguration)
6758
{
6859
var generator = new CodeAnalysisAssemblyInfo { Config = serviceConfiguration };
6960
var text = generator.TransformText();
7061
GeneratorDriver.WriteFile(codeAnalysisRoot, "Properties", "AssemblyInfo.cs", text);
7162
}
7263

73-
private void GenerateProperyValueRules(string codeAnalysisRoot, ServiceConfiguration serviceConfiguration)
64+
private void GeneratePropertyValueRules(string codeAnalysisRoot, ServiceConfiguration serviceConfiguration)
7465
{
7566
StringBuilder sb = new StringBuilder();
7667
using (var writer = XmlWriter.Create(sb, new XmlWriterSettings {Indent = true }))
@@ -85,12 +76,12 @@ private void GenerateProperyValueRules(string codeAnalysisRoot, ServiceConfigura
8576
{
8677
if (operation.RequestStructure != null)
8778
{
88-
GenerateProperyValueRules(serviceConfiguration, writer, operation.Name + "Request", operation.RequestStructure);
79+
GeneratePropertyValueRules(serviceConfiguration, writer, operation.Name + "Request", operation.RequestStructure);
8980
requestAndResponseShapes.Add(operation.RequestStructure.Name);
9081
}
9182
if (operation.ResponseStructure != null)
9283
{
93-
GenerateProperyValueRules(serviceConfiguration, writer, operation.Name + "Response", operation.ResponseStructure);
84+
GeneratePropertyValueRules(serviceConfiguration, writer, operation.Name + "Response", operation.ResponseStructure);
9485
requestAndResponseShapes.Add(operation.ResponseStructure.Name);
9586
}
9687
}
@@ -102,7 +93,7 @@ private void GenerateProperyValueRules(string codeAnalysisRoot, ServiceConfigura
10293

10394
if (shape.IsStructure)
10495
{
105-
GenerateProperyValueRules(serviceConfiguration, writer, shape.Name, shape);
96+
GeneratePropertyValueRules(serviceConfiguration, writer, shape.Name, shape);
10697
}
10798
}
10899
}
@@ -112,7 +103,7 @@ private void GenerateProperyValueRules(string codeAnalysisRoot, ServiceConfigura
112103
GeneratorDriver.WriteFile(Path.Combine(codeAnalysisRoot, "Generated"), string.Empty, "PropertyValueRules.xml", content);
113104
}
114105

115-
private void GenerateProperyValueRules(ServiceConfiguration serviceConfiguration, XmlWriter writer, string shapeName, Shape shape)
106+
private void GeneratePropertyValueRules(ServiceConfiguration serviceConfiguration, XmlWriter writer, string shapeName, Shape shape)
116107
{
117108
foreach (var member in shape.Members)
118109
{
@@ -151,7 +142,7 @@ private void GenerateProperyValueRules(ServiceConfiguration serviceConfiguration
151142
}
152143
}
153144

154-
private void GenerateProperyValueAnalyzer(string codeAnalysisRoot, ServiceConfiguration serviceConfiguration)
145+
private void GeneratePropertyValueAnalyzer(string codeAnalysisRoot, ServiceConfiguration serviceConfiguration)
155146
{
156147
var generator = new PropertyValueAssignmentAnalyzer { Config = serviceConfiguration };
157148
var text = generator.TransformText();

generator/ServiceClientGeneratorLib/CodeAnalysisSolutionCreator.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,13 @@ public void Execute()
1818
{
1919
var codeAnalysisProjects = GetListOfCodeAnalysisProjects();
2020

21+
if (Options.CreateCodeAnalysisVsixAssets)
22+
{
23+
GenerateVsixProject(codeAnalysisProjects);
24+
GenerateVsixManifest(codeAnalysisProjects);
25+
}
26+
2127
GenerateSolutionFile(codeAnalysisProjects);
22-
GenerateVsixProject(codeAnalysisProjects);
23-
GenerateVsixManifest(codeAnalysisProjects);
2428
}
2529

2630
public void GenerateSolutionFile(List<Project> codeAnalysisProjects)

generator/ServiceClientGeneratorLib/GeneratorOptions.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,13 @@ public class GeneratorOptions
8181
/// </summary>
8282
public bool ForceSolutionRebuilt { get; set; }
8383

84+
/// <summary>
85+
/// If set, the generator will create a vsix (Visual Studio Extension) project and manifest.
86+
/// This project will reference all of the service specific code analysis projects.
87+
/// The default behavior is not to create any assets.
88+
/// </summary>
89+
public bool CreateCodeAnalysisVsixAssets { get; set; }
90+
8491
public string SelfServiceModel { get; set; }
8592
public string SelfServiceBaseName { get; set; }
8693
public string SelfServiceEndpointPrefix { get; set; }
@@ -101,6 +108,7 @@ public GeneratorOptions()
101108
ServiceModels = string.Empty; // process all services
102109
CompileCustomizations = true;
103110
Clean = false;
111+
CreateCodeAnalysisVsixAssets = false;
104112
}
105113
}
106114
}

0 commit comments

Comments
 (0)