Skip to content

Commit 643af49

Browse files
Merge remote-tracking branch 'upstream/master' into fixNullHasher
2 parents cddaa9e + 68712aa commit 643af49

File tree

587 files changed

+60594
-45256
lines changed

Some content is hidden

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

587 files changed

+60594
-45256
lines changed

.editorconfig

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
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+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
# (Please don't specify an indent_size here; that has too many unintended consequences.)
13+
14+
# Code files
15+
[*.{cs,csx,vb,vbx,h,cpp,idl}]
16+
indent_size = 4
17+
18+
# Xml project files
19+
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
20+
indent_size = 2
21+
22+
# Xml config files
23+
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
24+
indent_size = 2
25+
26+
# JSON files
27+
[*.json]
28+
indent_size = 2
29+
30+
# Dotnet code style settings:
31+
[*.{cs,vb}]
32+
# Sort using and Import directives with System.* appearing first
33+
dotnet_sort_system_directives_first = true
34+
dotnet_style_qualification_for_field = false:silent
35+
dotnet_style_qualification_for_property = false:silent
36+
dotnet_style_qualification_for_method = false:silent
37+
dotnet_style_qualification_for_event = false:silent
38+
39+
# Use language keywords instead of framework type names for type references
40+
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
41+
dotnet_style_predefined_type_for_member_access = true:suggestion
42+
43+
# Suggest more modern language features when available
44+
dotnet_style_object_initializer = true:suggestion
45+
dotnet_style_collection_initializer = true:suggestion
46+
dotnet_style_coalesce_expression = true:suggestion
47+
dotnet_style_null_propagation = true:suggestion
48+
dotnet_style_explicit_tuple_names = true:suggestion
49+
50+
# Non-private static fields are PascalCase
51+
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.severity = suggestion
52+
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.symbols = non_private_static_fields
53+
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.style = non_private_static_field_style
54+
55+
dotnet_naming_symbols.non_private_static_fields.applicable_kinds = field
56+
dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities = public, protected, internal, protected internal, private protected
57+
dotnet_naming_symbols.non_private_static_fields.required_modifiers = static
58+
59+
dotnet_naming_style.non_private_static_field_style.capitalization = pascal_case
60+
61+
# Constants are PascalCase
62+
dotnet_naming_rule.constants_should_be_pascal_case.severity = suggestion
63+
dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants
64+
dotnet_naming_rule.constants_should_be_pascal_case.style = constant_style
65+
66+
dotnet_naming_symbols.constants.applicable_kinds = field, local
67+
dotnet_naming_symbols.constants.required_modifiers = const
68+
69+
dotnet_naming_style.constant_style.capitalization = pascal_case
70+
71+
# Static fields are camelCase
72+
dotnet_naming_rule.static_fields_should_be_camel_case.severity = suggestion
73+
dotnet_naming_rule.static_fields_should_be_camel_case.symbols = static_fields
74+
dotnet_naming_rule.static_fields_should_be_camel_case.style = static_field_style
75+
76+
dotnet_naming_symbols.static_fields.applicable_kinds = field
77+
dotnet_naming_symbols.static_fields.required_modifiers = static
78+
79+
dotnet_naming_style.static_field_style.capitalization = camel_case
80+
81+
# Instance fields are camelCase
82+
dotnet_naming_rule.instance_fields_should_be_camel_case.severity = suggestion
83+
dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields
84+
dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style
85+
86+
dotnet_naming_symbols.instance_fields.applicable_kinds = field
87+
88+
dotnet_naming_style.instance_field_style.capitalization = camel_case
89+
90+
# Locals and parameters are camelCase
91+
dotnet_naming_rule.locals_should_be_camel_case.severity = suggestion
92+
dotnet_naming_rule.locals_should_be_camel_case.symbols = locals_and_parameters
93+
dotnet_naming_rule.locals_should_be_camel_case.style = camel_case_style
94+
95+
dotnet_naming_symbols.locals_and_parameters.applicable_kinds = parameter, local
96+
97+
dotnet_naming_style.camel_case_style.capitalization = camel_case
98+
99+
# Local functions are PascalCase
100+
dotnet_naming_rule.local_functions_should_be_pascal_case.severity = suggestion
101+
dotnet_naming_rule.local_functions_should_be_pascal_case.symbols = local_functions
102+
dotnet_naming_rule.local_functions_should_be_pascal_case.style = local_function_style
103+
104+
dotnet_naming_symbols.local_functions.applicable_kinds = local_function
105+
106+
dotnet_naming_style.local_function_style.capitalization = pascal_case
107+
108+
# By default, name items with PascalCase
109+
dotnet_naming_rule.members_should_be_pascal_case.severity = suggestion
110+
dotnet_naming_rule.members_should_be_pascal_case.symbols = all_members
111+
dotnet_naming_rule.members_should_be_pascal_case.style = pascal_case_style
112+
113+
dotnet_naming_symbols.all_members.applicable_kinds = *
114+
115+
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
116+
117+
# CSharp code style settings:
118+
[*.cs]
119+
# Indentation preferences
120+
csharp_indent_block_contents = true
121+
csharp_indent_braces = false
122+
csharp_indent_case_contents = true
123+
csharp_indent_switch_labels = true
124+
csharp_indent_labels = flush_left
125+
126+
# Prefer "var" everywhere
127+
csharp_style_var_for_built_in_types = true:suggestion
128+
csharp_style_var_when_type_is_apparent = true:suggestion
129+
csharp_style_var_elsewhere = true:suggestion
130+
131+
# Prefer method-like constructs to have a block body
132+
csharp_style_expression_bodied_methods = false:none
133+
csharp_style_expression_bodied_constructors = false:none
134+
csharp_style_expression_bodied_operators = false:none
135+
136+
# Prefer property-like constructs to have an expression-body
137+
csharp_style_expression_bodied_properties = true:none
138+
csharp_style_expression_bodied_indexers = true:none
139+
csharp_style_expression_bodied_accessors = true:none
140+
141+
# Suggest more modern language features when available
142+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
143+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
144+
csharp_style_inlined_variable_declaration = true:suggestion
145+
csharp_style_throw_expression = true:suggestion
146+
csharp_style_conditional_delegate_call = true:suggestion
147+
148+
# Newline settings
149+
csharp_new_line_before_open_brace = all
150+
csharp_new_line_before_else = true
151+
csharp_new_line_before_catch = true
152+
csharp_new_line_before_finally = true
153+
csharp_new_line_before_members_in_object_initializers = true
154+
csharp_new_line_before_members_in_anonymous_types = true
155+
156+
# Blocks are allowed
157+
csharp_prefer_braces = true:silent

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Set default behavior to automatically normalize line endings.
33
###############################################################################
44
* text=auto
5+
*.sh text eol=lf
56

67
###############################################################################
78
# Set default behavior for command prompt diff.

.github/ISSUE_TEMPLATE/Bug_report.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
5+
---
6+
7+
#### Bug description
8+
9+
A clear and concise description of what the bug is.
10+
11+
#### Repro steps
12+
13+
Code to reproduce the behavior.
14+
15+
#### Expected behavior
16+
17+
A clear and concise description of what you expected to happen.
18+
19+
#### Actual behavior
20+
21+
What happened instead of what you expected.
22+
23+
- Version used:
24+
- Runtime: (e.g. .NET Framework, .NET Core, Unity, mono, etc.)
25+
26+
#### Additional context
27+
28+
Add any other context about the problem here.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
5+
---
6+
7+
#### Is your feature request related to a problem? Please describe.
8+
9+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
10+
11+
#### Describe the solution you'd like
12+
13+
A clear and concise description of what you want to happen.
14+
15+
#### Describe alternatives you've considered
16+
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
#### Additional context
20+
21+
Add any other context or screenshots about the feature request here.

.gitignore

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@ TestResult.xml
4141
[Rr]eleasePS/
4242
dlldata.c
4343

44-
# DNX
45-
project.lock.json
46-
project.fragment.lock.json
47-
artifacts/
48-
4944
*_i.c
5045
*_p.c
5146
*_i.h

CONTRIBUTING.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Contributing
2+
3+
## Dependencies
4+
5+
* [Visual Studio 2019](https://visualstudio.microsoft.com/)
6+
* [Unity Editor](https://unity3d.com/unity/editor) (optional)
7+
* .NET Core SDK and runtimes (run `init` to install)
8+
9+
This repo uses the .NET Core SDK and runtimes to build and test the projects.
10+
You can install the right versions of the SDK and runtimes by running the `init.ps1` script at the root of the repo.
11+
12+
By default no elevation is required as these toolsets are installed in a per-user directory. Launching `devenv` from the same PowerShell window that you ran the script will lead VS to discover these per-user toolsets.
13+
To get VS to find the toolsets when launched from the Start Menu, run `init -InstallLocality machine`, which requires elevation for each SDK or runtime installed.
14+
15+
## How to Build
16+
17+
Open `MessagePack.sln` on Visual Studio 2019.
18+
19+
Alternatively you may build from the command line using `msbuild.exe` or:
20+
21+
dotnet build /p:platform=NoVSIX
22+
23+
## Unity
24+
25+
Unity Project requires several dependency DLL's. At first, run `copy_assets.bat` under `src\MessagePack.UnityClient`.
26+
Then open that directory in the Unity Editor.
27+
28+
## Where to find our CI feed
29+
30+
Once a change is in a shipping branch (e.g. `v1.8`, `v2.0`, `master`), our CI will build it and push the built package
31+
to [our CI feed](https://dev.azure.com/ils0086/MessagePack-CSharp/_packaging?_a=feed&feed=MessagePack-CI). To depend on
32+
one of the packages that are on our CI feed (but not yet on nuget.org) you can add this to your nuget.config file:
33+
34+
```xml
35+
<add key="MessagePack-CI" value="https://pkgs.dev.azure.com/ils0086/MessagePack-CSharp/_packaging/MessagePack-CI/nuget/v3/index.json" />
36+
```

CONTRIBUTORS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Yoshifumi Kawai <[email protected]>
2+
Andrew Arnott <[email protected]>

Directory.Build.props

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,19 @@
33
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
44
<BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
55
<BaseOutputPath Condition=" '$(BaseOutputPath)' == '' ">$(MSBuildThisFileDirectory)bin\$(MSBuildProjectName)\</BaseOutputPath>
6+
<PackageOutputPath>$(MSBuildThisFileDirectory)bin\Packages\$(Configuration)\NuGet\</PackageOutputPath>
67

78
<GenerateDocumentationFile>true</GenerateDocumentationFile>
89
<LangVersion>7.3</LangVersion>
910
<NoWarn>$(NoWarn);CS1591</NoWarn>
11+
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)MessagePack.ruleset</CodeAnalysisRuleSet>
1012

1113
<IsPackable>false</IsPackable>
1214
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
13-
<PackageLicenseFile>LICENSE</PackageLicenseFile>
14-
<Authors>neuecc</Authors>
15-
<Owners>neuecc</Owners>
16-
<Copyright>© Yoshifumi Kawai. All rights reserved.</Copyright>
15+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
16+
<Authors>neuecc,aarnott</Authors>
17+
<Owners>neuecc,aarnott</Owners>
18+
<Copyright>© Yoshifumi Kawai and contributors. All rights reserved.</Copyright>
1719
<PackageProjectUrl>https://github.com/neuecc/MessagePack-CSharp</PackageProjectUrl>
1820

1921
<PublishRepositoryUrl>true</PublishRepositoryUrl>
@@ -23,10 +25,19 @@
2325
</PropertyGroup>
2426
<ItemGroup>
2527
<None Include="$(MSBuildThisFileDirectory)LICENSE" Pack="true" PackagePath="" />
28+
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json" Visible="false" />
2629
</ItemGroup>
2730
<ItemGroup>
28-
<PackageReference Include="Nerdbank.GitVersioning" Version="2.3.183" PrivateAssets="all" />
29-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-19351-01" PrivateAssets="All" />
30-
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-preview.2" PrivateAssets="All" />
31+
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
32+
<PackageReference Include="Nerdbank.GitVersioning" Version="3.0.48" PrivateAssets="all" />
33+
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="16.5.124-alpha" PrivateAssets="All" />
34+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
35+
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
3136
</ItemGroup>
37+
38+
<Target Name="PrepareReleaseNotes" BeforeTargets="GenerateNuspec" DependsOnTargets="GetBuildVersion">
39+
<PropertyGroup>
40+
<PackageReleaseNotes>https://github.com/neuecc/MessagePack-CSharp/releases/tag/v$(Version)</PackageReleaseNotes>
41+
</PropertyGroup>
42+
</Target>
3243
</Project>

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ MessagePack for C#
22

33
MIT License
44

5-
Copyright (c) 2017 Yoshifumi Kawai
5+
Copyright (c) 2017 Yoshifumi Kawai and contributors
66

77
Permission is hereby granted, free of charge, to any person obtaining a copy
88
of this software and associated documentation files (the "Software"), to deal
@@ -36,4 +36,4 @@ Redistributions of source code must retain the above copyright notice, this list
3636

3737
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3838

39-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -68,31 +68,31 @@
6868
<Rule Id="CA2241" Action="Warning" />
6969
<Rule Id="CA2242" Action="Warning" />
7070
</Rules>
71-
<Rules AnalyzerId="Microsoft.CodeAnalysis.Analyzers" RuleNamespace="Microsoft.CodeAnalysis.Analyzers">
72-
<Rule Id="RS1001" Action="None" />
73-
<Rule Id="RS1004" Action="None" />
74-
<Rule Id="RS1007" Action="None" />
75-
<Rule Id="RS1009" Action="None" />
76-
<Rule Id="RS1010" Action="None" />
77-
<Rule Id="RS1011" Action="None" />
78-
<Rule Id="RS1015" Action="None" />
79-
<Rule Id="RS1016" Action="None" />
80-
<Rule Id="RS1017" Action="None" />
81-
<Rule Id="RS1018" Action="None" />
82-
<Rule Id="RS1019" Action="None" />
83-
<Rule Id="RS1020" Action="None" />
84-
<Rule Id="RS1021" Action="None" />
71+
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
72+
<Rule Id="SA1005" Action="None" />
73+
<Rule Id="SA1121" Action="Hidden" />
74+
<Rule Id="SA1124" Action="Hidden" />
75+
<Rule Id="SA1133" Action="Hidden" />
76+
<Rule Id="SA1134" Action="Hidden" />
77+
<Rule Id="SA1139" Action="Hidden" />
78+
<Rule Id="SA1515" Action="None" />
79+
<!-- Documentation -->
80+
<Rule Id="SA1600" Action="Hidden" />
81+
<Rule Id="SA1601" Action="Hidden" />
82+
<Rule Id="SA1602" Action="Hidden" />
83+
<Rule Id="SA1604" Action="Hidden" />
84+
<Rule Id="SA1611" Action="Hidden" />
85+
<Rule Id="SA1615" Action="Hidden" />
86+
<Rule Id="SA1618" Action="Hidden" />
87+
<!-- ordering rules, to enable later -->
88+
<Rule Id="SA1201" Action="Hidden" />
89+
<Rule Id="SA1202" Action="Hidden" />
90+
<Rule Id="SA1204" Action="Hidden" />
91+
<Rule Id="SA1214" Action="Hidden" />
92+
<Rule Id="SA1402" Action="Hidden" />
93+
<Rule Id="SA1101" Action="Hidden" />
8594
</Rules>
86-
<Rules AnalyzerId="Microsoft.CodeAnalysis.CSharp.Analyzers" RuleNamespace="Microsoft.CodeAnalysis.CSharp.Analyzers">
87-
<Rule Id="RS1002" Action="None" />
88-
<Rule Id="RS1003" Action="None" />
89-
<Rule Id="RS1005" Action="None" />
90-
<Rule Id="RS1006" Action="None" />
91-
<Rule Id="RS1008" Action="None" />
92-
<Rule Id="RS1012" Action="None" />
93-
<Rule Id="RS1013" Action="None" />
94-
<Rule Id="RS1014" Action="None" />
95-
<Rule Id="RS1022" Action="None" />
96-
<Rule Id="RS1023" Action="None" />
95+
<Rules AnalyzerId="Microsoft.VisualStudio.Threading.Analyzers" RuleNamespace="Microsoft.VisualStudio.Threading.Analyzers">
96+
<Rule Id="VSTHRD111" Action="Warning" />
9797
</Rules>
9898
</RuleSet>

0 commit comments

Comments
 (0)