Skip to content

Commit 2a0ec4e

Browse files
authored
Merge pull request #66 from microsoft/users/tevinstanley/updatelibrarytemplate
Update to library template
2 parents 42ebf6f + 5c5a3a9 commit 2a0ec4e

File tree

235 files changed

+5237
-389
lines changed

Some content is hidden

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

235 files changed

+5237
-389
lines changed

.azuredevops/dependabot.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Please see the documentation for all configuration options:
2+
# https://eng.ms/docs/products/dependabot/configuration/version_updates
3+
4+
version: 2
5+
updates:
6+
- package-ecosystem: nuget
7+
directory: /
8+
schedule:
9+
interval: monthly

.config/dotnet-tools.json

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"powershell": {
6+
"version": "7.4.6",
7+
"commands": [
8+
"pwsh"
9+
],
10+
"rollForward": false
11+
},
12+
"dotnet-coverage": {
13+
"version": "17.12.6",
14+
"commands": [
15+
"dotnet-coverage"
16+
],
17+
"rollForward": false
18+
},
19+
"nbgv": {
20+
"version": "3.6.146",
21+
"commands": [
22+
"nbgv"
23+
],
24+
"rollForward": false
25+
},
26+
"docfx": {
27+
"version": "2.77.0",
28+
"commands": [
29+
"docfx"
30+
],
31+
"rollForward": false
32+
}
33+
}
34+
}

.devcontainer/Dockerfile

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions
2+
FROM mcr.microsoft.com/dotnet/sdk:8.0.402-jammy
3+
4+
# Installing mono makes `dotnet test` work without errors even for net472.
5+
# But installing it takes a long time, so it's excluded by default.
6+
#RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
7+
#RUN echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | tee /etc/apt/sources.list.d/mono-official-stable.list
8+
#RUN apt-get update
9+
#RUN DEBIAN_FRONTEND=noninteractive apt-get install -y mono-devel
10+
11+
# Clear the NUGET_XMLDOC_MODE env var so xml api doc files get unpacked, allowing a rich experience in Intellisense.
12+
# See https://github.com/dotnet/dotnet-docker/issues/2790 for a discussion on this, where the prioritized use case
13+
# was *not* devcontainers, sadly.
14+
ENV NUGET_XMLDOC_MODE=

.devcontainer/devcontainer.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "Dev space",
3+
"dockerFile": "Dockerfile",
4+
"settings": {
5+
"terminal.integrated.shell.linux": "/usr/bin/pwsh"
6+
},
7+
"postCreateCommand": "./init.ps1 -InstallLocality machine",
8+
"extensions": [
9+
"ms-azure-devops.azure-pipelines",
10+
"ms-dotnettools.csharp",
11+
"k--kato.docomment",
12+
"editorconfig.editorconfig",
13+
"pflannery.vscode-versionlens",
14+
"davidanson.vscode-markdownlint",
15+
"dotjoshjohnson.xml",
16+
"ms-vscode-remote.remote-containers",
17+
"ms-azuretools.vscode-docker",
18+
"ms-vscode.powershell"
19+
]
20+
}

.editorconfig

+192
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
# EditorConfig is awesome:http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Don't use tabs for indentation.
7+
[*]
8+
indent_style = space
9+
10+
# (Please don't specify an indent_size here; that has too many unintended consequences.)
11+
12+
[*.yml]
13+
indent_size = 2
14+
indent_style = space
15+
16+
# Code files
17+
[*.{cs,csx,vb,vbx,h,cpp,idl}]
18+
indent_size = 4
19+
insert_final_newline = true
20+
trim_trailing_whitespace = true
21+
22+
# MSBuild project files
23+
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj,msbuildproj,props,targets}]
24+
indent_size = 2
25+
26+
# Xml config files
27+
[*.{ruleset,config,nuspec,resx,vsixmanifest,vsct,runsettings}]
28+
indent_size = 2
29+
indent_style = space
30+
31+
# JSON files
32+
[*.json]
33+
indent_size = 2
34+
indent_style = space
35+
36+
[*.ps1]
37+
indent_style = space
38+
indent_size = 4
39+
40+
# Dotnet code style settings:
41+
[*.{cs,vb}]
42+
# Sort using and Import directives with System.* appearing first
43+
dotnet_sort_system_directives_first = true
44+
dotnet_separate_import_directive_groups = false
45+
dotnet_style_qualification_for_field = true:warning
46+
dotnet_style_qualification_for_property = true:warning
47+
dotnet_style_qualification_for_method = true:warning
48+
dotnet_style_qualification_for_event = true:warning
49+
50+
# Use language keywords instead of framework type names for type references
51+
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
52+
dotnet_style_predefined_type_for_member_access = true:suggestion
53+
54+
# Suggest more modern language features when available
55+
dotnet_style_object_initializer = true:suggestion
56+
dotnet_style_collection_initializer = true:suggestion
57+
dotnet_style_coalesce_expression = true:suggestion
58+
dotnet_style_null_propagation = true:suggestion
59+
dotnet_style_explicit_tuple_names = true:suggestion
60+
61+
# Non-private static fields are PascalCase
62+
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.severity = suggestion
63+
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.symbols = non_private_static_fields
64+
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.style = non_private_static_field_style
65+
66+
dotnet_naming_symbols.non_private_static_fields.applicable_kinds = field
67+
dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities = public, protected, internal, protected internal, private protected
68+
dotnet_naming_symbols.non_private_static_fields.required_modifiers = static
69+
70+
dotnet_naming_style.non_private_static_field_style.capitalization = pascal_case
71+
72+
# Constants are PascalCase
73+
dotnet_naming_rule.constants_should_be_pascal_case.severity = suggestion
74+
dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants
75+
dotnet_naming_rule.constants_should_be_pascal_case.style = constant_style
76+
77+
dotnet_naming_symbols.constants.applicable_kinds = field, local
78+
dotnet_naming_symbols.constants.required_modifiers = const
79+
80+
dotnet_naming_style.constant_style.capitalization = pascal_case
81+
82+
# Static fields are camelCase
83+
dotnet_naming_rule.static_fields_should_be_camel_case.severity = suggestion
84+
dotnet_naming_rule.static_fields_should_be_camel_case.symbols = static_fields
85+
dotnet_naming_rule.static_fields_should_be_camel_case.style = static_field_style
86+
87+
dotnet_naming_symbols.static_fields.applicable_kinds = field
88+
dotnet_naming_symbols.static_fields.required_modifiers = static
89+
90+
dotnet_naming_style.static_field_style.capitalization = camel_case
91+
92+
# Instance fields are camelCase
93+
dotnet_naming_rule.instance_fields_should_be_camel_case.severity = suggestion
94+
dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields
95+
dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style
96+
97+
dotnet_naming_symbols.instance_fields.applicable_kinds = field
98+
99+
dotnet_naming_style.instance_field_style.capitalization = camel_case
100+
101+
# Locals and parameters are camelCase
102+
dotnet_naming_rule.locals_should_be_camel_case.severity = suggestion
103+
dotnet_naming_rule.locals_should_be_camel_case.symbols = locals_and_parameters
104+
dotnet_naming_rule.locals_should_be_camel_case.style = camel_case_style
105+
106+
dotnet_naming_symbols.locals_and_parameters.applicable_kinds = parameter, local
107+
108+
dotnet_naming_style.camel_case_style.capitalization = camel_case
109+
110+
# Local functions are PascalCase
111+
dotnet_naming_rule.local_functions_should_be_pascal_case.severity = suggestion
112+
dotnet_naming_rule.local_functions_should_be_pascal_case.symbols = local_functions
113+
dotnet_naming_rule.local_functions_should_be_pascal_case.style = local_function_style
114+
115+
dotnet_naming_symbols.local_functions.applicable_kinds = local_function
116+
117+
dotnet_naming_style.local_function_style.capitalization = pascal_case
118+
119+
# By default, name items with PascalCase
120+
dotnet_naming_rule.members_should_be_pascal_case.severity = suggestion
121+
dotnet_naming_rule.members_should_be_pascal_case.symbols = all_members
122+
dotnet_naming_rule.members_should_be_pascal_case.style = pascal_case_style
123+
124+
dotnet_naming_symbols.all_members.applicable_kinds = *
125+
126+
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
127+
128+
# CSharp code style settings:
129+
[*.cs]
130+
# Indentation preferences
131+
csharp_indent_block_contents = true
132+
csharp_indent_braces = false
133+
csharp_indent_case_contents = true
134+
csharp_indent_switch_labels = true
135+
csharp_indent_labels = flush_left
136+
137+
# Prefer "var" everywhere
138+
csharp_style_var_for_built_in_types = false
139+
csharp_style_var_when_type_is_apparent = true:suggestion
140+
csharp_style_var_elsewhere = false:warning
141+
142+
# Prefer method-like constructs to have a block body
143+
csharp_style_expression_bodied_methods = false:none
144+
csharp_style_expression_bodied_constructors = false:none
145+
csharp_style_expression_bodied_operators = false:none
146+
147+
# Prefer property-like constructs to have an expression-body
148+
csharp_style_expression_bodied_properties = true:none
149+
csharp_style_expression_bodied_indexers = true:none
150+
csharp_style_expression_bodied_accessors = true:none
151+
152+
# Suggest more modern language features when available
153+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
154+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
155+
csharp_style_inlined_variable_declaration = true:suggestion
156+
csharp_style_throw_expression = true:suggestion
157+
csharp_style_conditional_delegate_call = true:suggestion
158+
159+
# Newline settings
160+
csharp_new_line_before_open_brace = all
161+
csharp_new_line_before_else = true
162+
csharp_new_line_before_catch = true
163+
csharp_new_line_before_finally = true
164+
csharp_new_line_before_members_in_object_initializers = true
165+
csharp_new_line_before_members_in_anonymous_types = true
166+
167+
# Blocks are allowed
168+
csharp_prefer_braces = true:silent
169+
170+
# SA1130: Use lambda syntax
171+
dotnet_diagnostic.SA1130.severity = silent
172+
173+
# IDE1006: Naming Styles - StyleCop handles these for us
174+
dotnet_diagnostic.IDE1006.severity = none
175+
176+
dotnet_diagnostic.DOC100.severity = silent
177+
dotnet_diagnostic.DOC104.severity = warning
178+
dotnet_diagnostic.DOC105.severity = warning
179+
dotnet_diagnostic.DOC106.severity = warning
180+
dotnet_diagnostic.DOC107.severity = warning
181+
dotnet_diagnostic.DOC108.severity = warning
182+
dotnet_diagnostic.DOC200.severity = warning
183+
dotnet_diagnostic.DOC202.severity = warning
184+
185+
# CA1062: Validate arguments of public methods
186+
dotnet_diagnostic.CA1062.severity = warning
187+
188+
# CA2016: Forward the CancellationToken parameter
189+
dotnet_diagnostic.CA2016.severity = warning
190+
191+
[*.sln]
192+
indent_style = tab

.gitattributes

+10-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
###############################################################################
44
* text=auto
55

6+
# Ensure shell scripts use LF line endings (linux only accepts LF)
7+
*.sh eol=lf
8+
*.ps1 eol=lf
9+
10+
# The macOS codesign tool is extremely picky, and requires LF line endings.
11+
*.plist eol=lf
12+
613
###############################################################################
714
# Set default behavior for command prompt diff.
815
#
@@ -17,7 +24,7 @@
1724
#
1825
# Merging from the command prompt will add diff markers to the files if there
1926
# are conflicts (Merging from VS is not affected by the settings below, in VS
20-
# the diff markers are never inserted). Diff markers may cause the following
27+
# the diff markers are never inserted). Diff markers may cause the following
2128
# file extensions to fail to load in VS. An alternative would be to treat
2229
# these files as binary and thus will always conflict and require user
2330
# intervention with every merge. To do so, just uncomment the entries below
@@ -46,9 +53,9 @@
4653

4754
###############################################################################
4855
# diff behavior for common document formats
49-
#
56+
#
5057
# Convert binary document formats to text before diffing them. This feature
51-
# is only available from the command line. Turn it on by uncommenting the
58+
# is only available from the command line. Turn it on by uncommenting the
5259
# entries below.
5360
###############################################################################
5461
#*.doc diff=astextplain

.github/dependabot.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Please see the documentation for all configuration options:
2+
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
3+
4+
version: 2
5+
updates:
6+
- package-ecosystem: nuget
7+
directory: /
8+
schedule:
9+
interval: weekly

0 commit comments

Comments
 (0)