Skip to content

Commit 8b90fa5

Browse files
committed
chore: add Amazon header to all files
1 parent 86cf81f commit 8b90fa5

40 files changed

+567
-176
lines changed

Diff for: .editorconfig

+247
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,247 @@
1+
root=true
2+
# top-most EditorConfig file
3+
4+
# Default settings:
5+
# A newline ending every file
6+
# Use 4 spaces as indentation
7+
[*]
8+
insert_final_newline=true
9+
indent_style=space
10+
indent_size=4
11+
trim_trailing_whitespace=true
12+
end_of_line=crlf
13+
charset=utf-8
14+
15+
[project.json]
16+
indent_size=2
17+
18+
# Generated code
19+
[*{_AssemblyInfo.cs,.notsupported.cs}]
20+
generated_code=true
21+
22+
# Xml project files
23+
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}]
24+
indent_size=2
25+
26+
[*.{csproj,vbproj,proj,nativeproj,locproj}]
27+
charset=utf-8
28+
29+
# Xml build files
30+
[*.builds]
31+
indent_size=2
32+
33+
# Xml files
34+
[*.{xml,stylecop,resx,ruleset}]
35+
indent_size=2
36+
37+
# Xml config files
38+
[*.{props,targets,config,nuspec}]
39+
indent_size=2
40+
41+
# YAML config files
42+
[*.{yml,yaml}]
43+
indent_size=2
44+
45+
# Shell scripts
46+
[*.sh]
47+
end_of_line=lf
48+
[*.{cmd,bat}]
49+
end_of_line=crlf
50+
51+
[*.lock]
52+
end_of_line=lf
53+
54+
# C# files
55+
[*.cs]
56+
max_line_length=140
57+
58+
# New line preferences
59+
csharp_new_line_before_open_brace=all
60+
csharp_new_line_before_else=true
61+
csharp_new_line_before_catch=true
62+
csharp_new_line_before_finally=true
63+
csharp_new_line_before_members_in_object_initializers=true
64+
csharp_new_line_before_members_in_anonymous_types=true
65+
csharp_new_line_between_query_expression_clauses=true
66+
67+
# Indentation preferences
68+
csharp_indent_block_contents=true
69+
csharp_indent_braces=false
70+
csharp_indent_case_contents=true
71+
csharp_indent_case_contents_when_block=true
72+
csharp_indent_switch_labels=true
73+
csharp_indent_labels=one_less_than_current
74+
75+
# Modifier preferences
76+
csharp_preferred_modifier_order=public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
77+
78+
# avoid this. unless absolutely necessary
79+
dotnet_style_qualification_for_field=false:warning
80+
dotnet_style_qualification_for_property=false:error
81+
dotnet_style_qualification_for_method=false:warning
82+
dotnet_style_qualification_for_event=false:warning
83+
84+
# Types: use keywords instead of BCL types, and prefer var
85+
csharp_style_var_elsewhere=true:suggestion
86+
csharp_style_var_for_built_in_types=true:suggestion
87+
csharp_style_var_when_type_is_apparent=true:suggestion
88+
dotnet_style_predefined_type_for_locals_parameters_members=true:suggestion
89+
dotnet_style_predefined_type_for_member_access=true:suggestion
90+
91+
# name all constant fields using ALL_UPPER
92+
dotnet_naming_rule.constant_fields_should_be_all_upper.severity=suggestion
93+
dotnet_naming_rule.constant_fields_should_be_all_upper.symbols=constant_fields
94+
dotnet_naming_rule.constant_fields_should_be_all_upper.style=consts_style
95+
dotnet_naming_symbols.constant_fields.applicable_kinds=field
96+
dotnet_naming_symbols.constant_fields.required_modifiers=const
97+
dotnet_naming_symbols.constant_fields.applicable_accessibilities=private, internal, private_protected
98+
dotnet_naming_style.consts_style.capitalization=all_upper
99+
dotnet_naming_style.consts_style.word_separator=_
100+
101+
# static fields should have s_ prefix
102+
dotnet_naming_rule.static_fields_should_have_prefix.severity=suggestion
103+
dotnet_naming_rule.static_fields_should_have_prefix.symbols=static_fields
104+
dotnet_naming_rule.static_fields_should_have_prefix.style=static_prefix_style
105+
dotnet_naming_symbols.static_fields.applicable_kinds=field
106+
dotnet_naming_symbols.static_fields.required_modifiers=static
107+
dotnet_naming_symbols.static_fields.applicable_accessibilities=private, internal, private_protected
108+
dotnet_naming_style.static_prefix_style.required_prefix=s_
109+
dotnet_naming_style.static_prefix_style.capitalization=camel_case
110+
111+
# internal and private fields should be _camelCase
112+
dotnet_naming_rule.camel_case_for_private_internal_fields.severity=suggestion
113+
dotnet_naming_rule.camel_case_for_private_internal_fields.symbols=private_internal_fields
114+
dotnet_naming_rule.camel_case_for_private_internal_fields.style=camel_case_underscore_style
115+
dotnet_naming_symbols.private_internal_fields.applicable_kinds=field
116+
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities=private, internal
117+
dotnet_naming_style.camel_case_underscore_style.required_prefix=_
118+
dotnet_naming_style.camel_case_underscore_style.capitalization=camel_case
119+
120+
# Code style defaults
121+
csharp_using_directive_placement=outside_namespace:suggestion
122+
dotnet_sort_system_directives_first=true
123+
csharp_prefer_braces=true:silent
124+
csharp_preserve_single_line_blocks=true:none
125+
csharp_preserve_single_line_statements=false:none
126+
csharp_prefer_static_local_function=true:suggestion
127+
csharp_prefer_simple_using_statement=false:none
128+
csharp_style_prefer_switch_expression=true:suggestion
129+
130+
# Code quality
131+
dotnet_style_readonly_field=true:warning
132+
dotnet_code_quality_unused_parameters=non_public:warning
133+
134+
# Expression-level preferences
135+
dotnet_style_object_initializer=true:suggestion
136+
dotnet_style_collection_initializer=true:suggestion
137+
dotnet_style_explicit_tuple_names=true:suggestion
138+
dotnet_style_coalesce_expression=true:suggestion
139+
dotnet_style_null_propagation=true:suggestion
140+
dotnet_style_prefer_is_null_check_over_reference_equality_method=true:suggestion
141+
dotnet_style_prefer_inferred_tuple_names=true:suggestion
142+
dotnet_style_prefer_inferred_anonymous_type_member_names=true:suggestion
143+
dotnet_style_prefer_auto_properties=true:suggestion
144+
dotnet_style_prefer_conditional_expression_over_assignment=true:silent
145+
dotnet_style_prefer_conditional_expression_over_return=true:silent
146+
csharp_prefer_simple_default_expression=true:suggestion
147+
148+
# Expression-bodied members
149+
csharp_style_expression_bodied_methods=true:silent
150+
csharp_style_expression_bodied_constructors=true:silent
151+
csharp_style_expression_bodied_operators=true:silent
152+
csharp_style_expression_bodied_properties=true:silent
153+
csharp_style_expression_bodied_indexers=true:silent
154+
csharp_style_expression_bodied_accessors=true:silent
155+
csharp_style_expression_bodied_lambdas=true:silent
156+
csharp_style_expression_bodied_local_functions=true:silent
157+
158+
# Pattern matching
159+
csharp_style_pattern_matching_over_is_with_cast_check=true:suggestion
160+
csharp_style_pattern_matching_over_as_with_null_check=true:suggestion
161+
csharp_style_inlined_variable_declaration=true:suggestion
162+
163+
# Null checking preferences
164+
csharp_style_throw_expression=true:suggestion
165+
csharp_style_conditional_delegate_call=true:suggestion
166+
167+
# Other features
168+
csharp_style_prefer_index_operator=false:none
169+
csharp_style_prefer_range_operator=false:none
170+
csharp_style_pattern_local_over_anonymous_function=false:none
171+
172+
# Space preferences
173+
csharp_space_after_cast=false
174+
csharp_space_after_colon_in_inheritance_clause=true
175+
csharp_space_after_comma=true
176+
csharp_space_after_dot=false
177+
csharp_space_after_keywords_in_control_flow_statements=true
178+
csharp_space_after_semicolon_in_for_statement=true
179+
csharp_space_around_binary_operators=before_and_after
180+
csharp_space_around_declaration_statements=do_not_ignore
181+
csharp_space_before_colon_in_inheritance_clause=true
182+
csharp_space_before_comma=false
183+
csharp_space_before_dot=false
184+
csharp_space_before_open_square_brackets=false
185+
csharp_space_before_semicolon_in_for_statement=false
186+
csharp_space_between_empty_square_brackets=false
187+
csharp_space_between_method_call_empty_parameter_list_parentheses=false
188+
csharp_space_between_method_call_name_and_opening_parenthesis=false
189+
csharp_space_between_method_call_parameter_list_parentheses=false
190+
csharp_space_between_method_declaration_empty_parameter_list_parentheses=false
191+
csharp_space_between_method_declaration_name_and_open_parenthesis=false
192+
csharp_space_between_method_declaration_parameter_list_parentheses=false
193+
csharp_space_between_parentheses=false
194+
csharp_space_between_square_brackets=false
195+
196+
# Analyzers
197+
dotnet_code_quality.ca1802.api_surface=private, internal
198+
dotnet_code_quality.ca1822.api_surface=private, internal
199+
dotnet_code_quality.ca2208.api_surface=public
200+
201+
# CA1822: Mark members as static
202+
dotnet_diagnostic.ca1822.severity=none
203+
204+
# License header
205+
file_header_template= Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\r\nSPDX-License-Identifier: Apache-2.0
206+
207+
# ReSharper properties
208+
resharper_braces_for_for=required
209+
resharper_braces_for_foreach=required
210+
resharper_braces_for_ifelse=required_for_multiline
211+
resharper_braces_for_while=required
212+
resharper_braces_redundant=false
213+
resharper_csharp_wrap_arguments_style=chop_if_long
214+
resharper_csharp_wrap_lines=false
215+
resharper_csharp_wrap_parameters_style=chop_if_long
216+
resharper_enforce_line_ending_style=true
217+
resharper_max_initializer_elements_on_line=1
218+
resharper_space_before_foreach_parentheses=true
219+
resharper_space_before_if_parentheses=true
220+
resharper_space_within_single_line_array_initializer_braces=true
221+
resharper_use_indent_from_vs=false
222+
resharper_wrap_after_declaration_lpar=true
223+
resharper_wrap_object_and_collection_initializer_style=chop_always
224+
225+
226+
# ReSharper inspection severities
227+
# https://www.jetbrains.com/help/resharper/EditorConfig_Index.html
228+
resharper_arrange_redundant_parentheses_highlighting=hint
229+
resharper_arrange_this_qualifier_highlighting=error
230+
resharper_arrange_type_member_modifiers_highlighting=hint
231+
resharper_arrange_type_modifiers_highlighting=hint
232+
resharper_built_in_type_reference_style_for_member_access_highlighting=hint
233+
resharper_built_in_type_reference_style_highlighting=hint
234+
resharper_ca1031_highlighting=suggestion
235+
resharper_ca1308_highlighting=none
236+
resharper_ca2007_highlighting=none
237+
resharper_convert_closure_to_method_group_highlighting=hint
238+
resharper_convert_to_static_class_highlighting=none
239+
resharper_member_can_be_made_static_global_highlighting=none
240+
resharper_member_can_be_made_static_local_highlighting=none
241+
resharper_redundant_base_qualifier_highlighting=warning
242+
resharper_suggest_var_or_type_built_in_types_highlighting=hint
243+
resharper_suggest_var_or_type_elsewhere_highlighting=hint
244+
resharper_suggest_var_or_type_simple_types_highlighting=hint
245+
resharper_web_config_module_not_resolved_highlighting=warning
246+
resharper_web_config_type_not_resolved_highlighting=warning
247+
resharper_web_config_wrong_module_highlighting=warning

Diff for: .gitattribute

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Set the default behavior, in case people don't have core.autocrlf set.
2+
* text=auto
3+
4+
# Declare files that will always have CRLF line endings on checkout.
5+
*.sln text eol=crlf
6+
7+
# Denote all files that are truly binary and should not be modified.
8+
*.png binary
9+
*.jpg binary

Diff for: Tools/LambdaTestTool-v2/Amazon.Lambda.TestTool.sln

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{827E0CD3-B72D-47B6-A68D-7590B98EB39B}"
4+
EndProject
5+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Amazon.Lambda.TestTool", "src\Amazon.Lambda.TestTool\Amazon.Lambda.TestTool.csproj", "{97EE2E8A-D1F4-CB11-B664-B99B036E9F7B}"
6+
EndProject
7+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{0AB3BF05-4346-4AA6-1389-037BE0695223}"
8+
EndProject
9+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Amazon.Lambda.TestTool.UnitTests", "tests\Amazon.Lambda.TestTool.UnitTests\Amazon.Lambda.TestTool.UnitTests.csproj", "{80A4F809-28B7-61EC-6539-DF3C7A0733FD}"
10+
EndProject
11+
Global
12+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
13+
Debug|Any CPU = Debug|Any CPU
14+
Release|Any CPU = Release|Any CPU
15+
EndGlobalSection
16+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
17+
{97EE2E8A-D1F4-CB11-B664-B99B036E9F7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
18+
{97EE2E8A-D1F4-CB11-B664-B99B036E9F7B}.Debug|Any CPU.Build.0 = Debug|Any CPU
19+
{97EE2E8A-D1F4-CB11-B664-B99B036E9F7B}.Release|Any CPU.ActiveCfg = Release|Any CPU
20+
{97EE2E8A-D1F4-CB11-B664-B99B036E9F7B}.Release|Any CPU.Build.0 = Release|Any CPU
21+
{80A4F809-28B7-61EC-6539-DF3C7A0733FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
22+
{80A4F809-28B7-61EC-6539-DF3C7A0733FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
23+
{80A4F809-28B7-61EC-6539-DF3C7A0733FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
24+
{80A4F809-28B7-61EC-6539-DF3C7A0733FD}.Release|Any CPU.Build.0 = Release|Any CPU
25+
EndGlobalSection
26+
GlobalSection(NestedProjects) = preSolution
27+
{97EE2E8A-D1F4-CB11-B664-B99B036E9F7B} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
28+
{80A4F809-28B7-61EC-6539-DF3C7A0733FD} = {0AB3BF05-4346-4AA6-1389-037BE0695223}
29+
EndGlobalSection
30+
EndGlobal
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<Description>A tool to help debug and test your .NET AWS Lambda functions locally.</Description>
4+
<Description>A tool to help debug and test your .NET AWS Lambda functions locally.</Description>
55
<TargetFramework>net8.0</TargetFramework>
66
<Nullable>enable</Nullable>
77
<ImplicitUsings>enable</ImplicitUsings>
88
<Product>AWS .NET Lambda Test Tool</Product>
99
<Copyright>Apache 2</Copyright>
10-
<PackageTags>AWS;Amazon;Lambda</PackageTags>
11-
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
10+
<PackageTags>AWS;Amazon;Lambda</PackageTags>
11+
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
1212
<IsPackable>true</IsPackable>
1313
<PackAsTool>true</PackAsTool>
14-
<PackageId>Amazon.Lambda.TestTool</PackageId>
14+
<PackageId>Amazon.Lambda.TestTool</PackageId>
1515
</PropertyGroup>
16-
16+
1717
<ItemGroup>
1818
<PackageReference Include="Spectre.Console" Version="0.49.1" />
1919
<PackageReference Include="Spectre.Console.Cli" Version="0.49.1" />
2020
<PackageReference Include="Blazored.Modal" Version="7.3.1" />
21-
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="8.0.11" />
22-
</ItemGroup>
23-
21+
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="8.0.11" />
22+
</ItemGroup>
23+
2424
<ItemGroup>
2525
<EmbeddedResource Include="wwwroot\**" />
26-
<EmbeddedResource Include="Resources\**" />
26+
<EmbeddedResource Include="Resources\**" />
2727
</ItemGroup>
2828

2929
</Project>

Diff for: Tools/LambdaTestTool-v2/src/Amazon.Lambda.TestTool/Commands/CancellableAsyncCommand.cs

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using System.Runtime.InteropServices;
1+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
using System.Runtime.InteropServices;
25

36
namespace Spectre.Console.Cli;
47

@@ -33,4 +36,4 @@ void onSignal(PosixSignalContext context)
3336
cancellationSource.Cancel();
3437
}
3538
}
36-
}
39+
}

Diff for: Tools/LambdaTestTool-v2/src/Amazon.Lambda.TestTool/Commands/RunCommand.cs

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
using System.Diagnostics;
25
using Amazon.Lambda.TestTool.Commands.Settings;
36
using Amazon.Lambda.TestTool.Extensions;
@@ -8,14 +11,14 @@
811

912
namespace Amazon.Lambda.TestTool.Commands;
1013

11-
/// <summary>
12-
/// The default command of the application which is responsible for launching the Lambda Runtime API and the API Gateway Emulator.
14+
/// <summary>
15+
/// The default command of the application which is responsible for launching the Lambda Runtime API and the API Gateway Emulator.
1316
/// </summary>
1417
public sealed class RunCommand(
1518
IToolInteractiveService toolInteractiveService) : CancellableAsyncCommand<RunCommandSettings>
1619
{
17-
/// <summary>
18-
/// The method responsible for executing the <see cref="RunCommand"/>.
20+
/// <summary>
21+
/// The method responsible for executing the <see cref="RunCommand"/>.
1922
/// </summary>
2023
public override async Task<int> ExecuteAsync(CommandContext context, RunCommandSettings settings, CancellationTokenSource cancellationTokenSource)
2124
{
@@ -77,4 +80,4 @@ public override async Task<int> ExecuteAsync(CommandContext context, RunCommandS
7780
await cancellationTokenSource.CancelAsync();
7881
}
7982
}
80-
}
83+
}

0 commit comments

Comments
 (0)