Skip to content

Commit

Permalink
Merge branch 'master' of github.com:lucasteles/Backdash
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasteles committed Sep 3, 2024
2 parents 68146c3 + deafeca commit f0ad330
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 14 deletions.
14 changes: 9 additions & 5 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,29 @@
"version": "5.3.8",
"commands": [
"reportgenerator"
]
],
"rollForward": false
},
"nuke.globaltool": {
"version": "8.0.0",
"commands": [
"nuke"
]
],
"rollForward": false
},
"docfx": {
"version": "2.77.0",
"commands": [
"docfx"
]
],
"rollForward": false
},
"gitversion.tool": {
"version": "6.0.0",
"version": "6.0.2",
"commands": [
"dotnet-gitversion"
]
],
"rollForward": false
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,10 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Backdash\Backdash.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="SonarAnalyzer.CSharp" Version="9.32.0.97167">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
6 changes: 5 additions & 1 deletion benchmarks/Backdash.Benchmarks/Backdash.Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
<NoWarn>CS1591;S125;S1199;CS016;S1144;S3903;CS159;S1104;MSB3277</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.12"/>
<PackageReference Include="BenchmarkDotNet" Version="0.14.0" />
<PackageReference Update="SonarAnalyzer.CSharp" Version="9.32.0.97167">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Backdash\Backdash.csproj"/>
Expand Down
6 changes: 5 additions & 1 deletion src/Backdash.Analyzers/Backdash.Analyzers.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.10.0" PrivateAssets="all"/>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.11.0" PrivateAssets="all" />
<PackageReference Update="SonarAnalyzer.CSharp" Version="9.32.0.97167">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
7 changes: 7 additions & 0 deletions src/Backdash.Utils/Backdash.Utils.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,11 @@
<PackageTags>network, endpoint, multiplayer, json, input</PackageTags>
<NoWarn>CS1591</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Update="SonarAnalyzer.CSharp" Version="9.32.0.97167">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
7 changes: 7 additions & 0 deletions src/Backdash/Backdash.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,11 @@
<ItemGroup>
<None Include="$(OutputPath)\Backdash.Analyzers.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false"/>
</ItemGroup>

<ItemGroup>
<PackageReference Update="SonarAnalyzer.CSharp" Version="9.32.0.97167">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
2 changes: 2 additions & 0 deletions src/Backdash/Network/Client/PeerClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ async Task ReceiveLoop(CancellationToken ct)
}

// ReSharper disable once RedundantAssignment
#pragma warning disable S1854
buffer = null;
#pragma warning restore S1854
}

ValueTask<int> SendTo(
Expand Down
12 changes: 8 additions & 4 deletions tests/Backdash.Tests/Backdash.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,25 @@
<NoWarn>CS1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Bogus" Version="35.5.1"/>
<PackageReference Include="Bogus" Version="35.6.1" />
<PackageReference Include="FakeItEasy" Version="8.3.0"/>
<PackageReference Include="FakeItEasy.AutoFakeIt" Version="2.0.0"/>
<PackageReference Include="FluentAssertions" Version="6.12.0"/>
<PackageReference Include="FsCheck.Xunit" Version="2.16.6"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0"/>
<PackageReference Include="xunit" Version="2.8.1"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.0" />
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Update="SonarAnalyzer.CSharp" Version="9.32.0.97167">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Specs\Integration\"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ enum OpMessage : short
DecrementCallback = 4,
}

void HandleMessage(ref int totalResult, OpMessage message)
static void HandleMessage(ref int totalResult, OpMessage message)
{
switch (message)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public bool TestUShortEnum(UShortEnum value, Endianness endianness) =>
public bool TestSByteEnum(SByteEnum value, Endianness endianness) =>
TestEnum(value, endianness);

bool TestEnum<T>(T value, Endianness endianness) where T : unmanaged, Enum
static bool TestEnum<T>(T value, Endianness endianness) where T : unmanaged, Enum
{
var size = Setup<T>(endianness, out var writer, out var reader);
writer.WriteEnum(value);
Expand Down Expand Up @@ -307,7 +307,7 @@ public bool TestUShort(ushort value, Endianness endianness) =>
public bool TestSByte(sbyte value, Endianness endianness) =>
TestInteger(value, endianness);

bool TestInteger<T>(T value, Endianness endianness) where T : unmanaged, IBinaryInteger<T>, IMinMaxValue<T>
static bool TestInteger<T>(T value, Endianness endianness) where T : unmanaged, IBinaryInteger<T>, IMinMaxValue<T>
{
var size = Setup<T>(endianness, out var writer, out var reader);
writer.WriteNumber(value);
Expand Down

0 comments on commit f0ad330

Please sign in to comment.