Skip to content

Commit

Permalink
[net]build(nuget): make published Sails.Net NuGet healthier (#737)
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisInSky authored Dec 17, 2024
1 parent 43a8ddd commit 7b3373c
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 7 deletions.
6 changes: 6 additions & 0 deletions net/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,12 @@ csharp_style_unused_value_assignment_preference = discard_variable:none
dotnet_diagnostic.IDE0059.severity = none
dotnet_diagnostic.CA1416.severity = warning

# Disable some checks for generated code
[**/Substrate.Gear.Api/Api/**/*.cs]
dotnet_diagnostic.CS1570.severity = none
dotnet_diagnostic.CS1573.severity = none
dotnet_diagnostic.CS1587.severity = none

# Verify settings
[*.{received,verified}.{json,txt,xml,cs}]
charset = "utf-8-bom"
Expand Down
5 changes: 4 additions & 1 deletion net/src/Sails.ClientGenerator/Sails.ClientGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Description>Code generator for clients to communictae with Sails programs</Description>
<Deterministic>true</Deterministic>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseExpression>MIT OR Apache-2.0</PackageLicenseExpression>
<PackageTags>Sails, Vara, Gear, Substrate</PackageTags>
<PackageTags>Sails;Vara;Gear;Substrate</PackageTags>
<MinVerTagPrefix>net/v</MinVerTagPrefix>
</PropertyGroup>

Expand Down
6 changes: 5 additions & 1 deletion net/src/Sails.Net/Sails.Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Description>Low-level abstractions for communicating with Sails programs</Description>
<Deterministic>true</Deterministic>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseExpression>MIT OR Apache-2.0</PackageLicenseExpression>
<PackageTags>Sails, Vara, Gear, Substrate</PackageTags>
<PackageTags>Sails;Vara;Gear;Substrate</PackageTags>
<MinVerTagPrefix>net/v</MinVerTagPrefix>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ public class BaseDictionary<TKey, TValue> : IType
where TValue : IType, new()
{
/// <summary>
/// Explicit conversion from Dictionary<TKey, TValue> to BaseDictionary
/// Explicit conversion from <see cref="Dictionary{TKey, TValue}"></see> to BaseDictionary
/// </summary>
/// <param name="p"></param>
public static explicit operator BaseDictionary<TKey, TValue>(Dictionary<TKey, TValue> p) => new(p);

/// <summary>
/// Implicit conversion from BaseDictionary to Dictionary<TKey, TValue>
/// Implicit conversion from BaseDictionary to <see cref="Dictionary{TKey, TValue}"></see>
/// </summary>
/// <param name="p"></param>
public static implicit operator Dictionary<TKey, TValue>(BaseDictionary<TKey, TValue> p) => p.Value;
Expand Down Expand Up @@ -68,7 +68,7 @@ public byte[] Encode()
result.AddRange(kv.Key.Encode());
result.AddRange(kv.Value.Encode());
}
return result.ToArray();
return [.. result];
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions net/src/Substrate.Gear.Client/ReplyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ public sealed record ReplyInfo
public required byte[] EncodedPayload { get; init; }
/// <summary>
/// Value sent with the reply.
/// /// </summary>
/// </summary>
public required ValueUnit Value { get; init; }
/// <summary>
/// Reply code of the reply.
/// <summary>
/// </summary>
public required EnumReplyCode Code { get; init; }
}

0 comments on commit 7b3373c

Please sign in to comment.