Skip to content

Commit

Permalink
0.27.0 - Use repackaged InterlockLedger.Tags.ILInt
Browse files Browse the repository at this point in the history
  • Loading branch information
monoman committed Nov 21, 2019
1 parent 39aea5e commit 1366653
Show file tree
Hide file tree
Showing 13 changed files with 120 additions and 19 deletions.
62 changes: 54 additions & 8 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,25 +1,35 @@
[*.xml]
indent_style = space
indent_size = 2

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
trim_trailing_whitespace = true


[*.cs]
csharp_indent_switch_labels=false
csharp_new_line_before_catch=false
csharp_new_line_before_else=false
csharp_new_line_before_finally=false
csharp_new_line_before_open_brace=types
csharp_prefer_simple_default_expression=true:silent
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_style_expression_bodied_accessors=true:suggestion
csharp_style_expression_bodied_constructors=true:suggestion
csharp_style_expression_bodied_indexers=true:suggestion
csharp_style_expression_bodied_methods=true:suggestion
csharp_style_expression_bodied_operators=true:suggestion
csharp_style_expression_bodied_properties=true:suggestion
csharp_style_inlined_variable_declaration=true:silent
csharp_style_inlined_variable_declaration=true:suggestion
csharp_style_pattern_matching_over_as_with_null_check=true:warning
csharp_style_var_when_type_is_apparent=true:suggestion
csharp_style_var_elsewhere = true:suggestion
csharp_style_var_for_built_in_types = false:none
csharp_style_var_when_type_is_apparent = true:suggestion
dotnet_separate_import_directive_groups=false
dotnet_sort_system_directives_first=true
dotnet_style_coalesce_expression=true:suggestion
Expand All @@ -33,13 +43,49 @@ dotnet_style_prefer_conditional_expression_over_return=true
dotnet_style_prefer_is_null_check_over_reference_equality_method=true:suggestion
dotnet_style_readonly_field=true:warning
dotnet_style_require_accessibility_modifiers=always:silent
dotnet_style_predefined_type_for_member_access = true:error

[*.xml]
indent_style = space
[*.cs]
# Style Definitions
dotnet_naming_style.underscored_style.capitalization = camel_case
dotnet_naming_style.underscored_style.required_prefix = _

# CA1819: Properties should not return arrays
dotnet_diagnostic.CA1819.severity = none
# Use CamelCase for private fields
dotnet_naming_rule.private_fields_should_be_camel_case.severity = suggestion
dotnet_naming_rule.private_fields_should_be_camel_case.symbols = private_fields
dotnet_naming_rule.private_fields_should_be_camel_case.style = underscored_style
dotnet_naming_symbols.private_fields.applicable_kinds = field,property
dotnet_naming_symbols.private_fields.applicable_accessibilities = private

dotnet_code_quality_unused_parameters = non_public:suggestion

# CA1028: Enum Storage should be Int32
# CA1031: Do not catch general exception types
dotnet_diagnostic.CA1031.severity = silent
# CA1032: Implement standard exception constructors
# CA1034: Do not nest type
# CA1051: Do not declare visible instance fields
# CA1054: URI strings
# CA1063: Implement IDisposable Correctly
# CA1303: Do not pass literals as localized parameters
# CA1308: no ToLowercase
# CA1707: Identifiers should not contain underscores
# CA1815: Override equals and operator equals on value types
# CA1819: Properties should not return arrays
# CA2007: Consider calling ConfigureAwait on the awaited task
# CA2225: op_implicit
# CA2227: Enum Storage should be Int32
dotnet_diagnostic.CA1028.severity = none
dotnet_diagnostic.CA1031.severity = none
dotnet_diagnostic.CA1032.severity = none
dotnet_diagnostic.CA1034.severity = none
dotnet_diagnostic.CA1051.severity = none
dotnet_diagnostic.CA1054.severity = none
dotnet_diagnostic.CA1063.severity = none
dotnet_diagnostic.CA1303.severity = none
dotnet_diagnostic.CA1308.severity = none
dotnet_diagnostic.CA1707.severity = none
dotnet_diagnostic.CA1710.severity = none
dotnet_diagnostic.CA1815.severity = none
dotnet_diagnostic.CA1819.severity = none
dotnet_diagnostic.CA2007.severity = none
dotnet_diagnostic.CA2225.severity = none
dotnet_diagnostic.CA2227.severity = none
23 changes: 23 additions & 0 deletions .github/workflows/dotnetcore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: .NET Core

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Setup .NET Core 2.2
uses: actions/setup-dotnet@v1
with:
dotnet-version: 2.2.207
- name: Install additional dotnet 3.0
run: sudo apt-get install dotnet-sdk-3.0
- name: Create NuGet.Config.template
run: echo '<?xml version="1.0" encoding="utf-8"?><configuration><packageSources><add key="GitHub" value="https://nuget.pkg.github.com/interlockledger/index.json" /></packageSources><packageSourceCredentials><GitHub><add key="Username" value="interlockledger" /><add key="ClearTextPassword" value="GH_TOKEN" /></GitHub></packageSourceCredentials></configuration>' > NuGet.Config.template
- name: Setup Nuget.Config
run: sed -e "s/GH_TOKEN/${{ secrets.RegistryToken }}/" NuGet.Config.template > NuGet.Config
- name: Test with dotnet
run: dotnet test --configuration Release -v:m
29 changes: 29 additions & 0 deletions .github/workflows/pushnuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: .NET Nuget

on:
release:
types: [published]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Setup .NET Core 2.2
uses: actions/setup-dotnet@v1
with:
dotnet-version: 2.2.207
- name: Install additional dotnet 3.0
run: sudo apt-get install dotnet-sdk-3.0
- name: Create NuGet.Config.template
run: echo '<?xml version="1.0" encoding="utf-8"?><configuration><packageSources><add key="GitHub" value="https://nuget.pkg.github.com/interlockledger/index.json" /></packageSources><packageSourceCredentials><GitHub><add key="Username" value="interlockledger" /><add key="ClearTextPassword" value="GH_TOKEN" /></GitHub></packageSourceCredentials></configuration>' > NuGet.Config.template
- name: Setup Nuget.Config
run: sed -e "s/GH_TOKEN/${{ secrets.RegistryToken }}/" NuGet.Config.template > NuGet.Config
- name: Test with dotnet
run: dotnet test --configuration Release -v:m
- name: Pack nuget
run: dotnet pack -o `pwd`/.nugets --configuration Release --no-build -v:m
- name: Push nuget
run: dotnet nuget push `pwd`/.nugets/*.nupkg -s GitHub
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="InterlockLedger.ILInt" Version="1.1.1" />
<PackageReference Include="InterlockLedger.Tags.ILInt" Version="1.1.3" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="2.2.0" />
Expand Down
2 changes: 1 addition & 1 deletion Demo.InterlockLedger.Peer2Peer/DemoBaseSink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
******************************************************************************************************************************/

using InterlockLedger.ILInt;
using InterlockLedger.Peer2Peer;
using InterlockLedger.Tags;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using System;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="InterlockLedger.Tags.ILInt" Version="1.1.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
******************************************************************************************************************************/

using InterlockLedger.ILInt;
using InterlockLedger.Tags;
using System;
using System.IO.Pipelines;
using System.Threading;
Expand Down
2 changes: 1 addition & 1 deletion InterlockLedger.Peer2Peer/Extensions/SocketExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
******************************************************************************************************************************/

using InterlockLedger.ILInt;
using InterlockLedger.Tags;
using System;
using System.Collections.Generic;
using System.Net.Sockets;
Expand Down
2 changes: 1 addition & 1 deletion InterlockLedger.Peer2Peer/Helpers/AsyncLock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public Task WaitAsync() {
}
}

private readonly static Task _completed = Task.FromResult(true);
private static readonly Task _completed = Task.FromResult(true);
private readonly Queue<TaskCompletionSource<bool>> _waiters = new Queue<TaskCompletionSource<bool>>();
private int _currentCount;
}
Expand Down
8 changes: 4 additions & 4 deletions InterlockLedger.Peer2Peer/InterlockLedger.Peer2Peer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>0.26.4</Version>
<Version>0.27.0</Version>
<Authors>Rafael Teixeira</Authors>
<Company>InterlockLedger Network</Company>
<Product>InterlockLedger</Product>
<Description>This library implements the backbone of a P2P network in .NET, with peer discoverability and routing. Plug your network protocol and defaults into it to have a working node.</Description>
<Copyright>Copyright (c) 2017-2019 InterlockLedger Network</Copyright>
<PackageLicenseUrl></PackageLicenseUrl>
<PackageProjectUrl>https://interlockledger.network/</PackageProjectUrl>
<RepositoryUrl>https://github.com/interlockledger/peer2peer.git</RepositoryUrl>
<RepositoryUrl>https://github.com/interlockledger/interlockledger-peer2peer.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageReleaseNotes>Some method signature changes in public interfaces</PackageReleaseNotes>
<PackageReleaseNotes>Use new repackaged InterlockLedger.Tags.ILInt</PackageReleaseNotes>
<LangVersion>latest</LangVersion>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="InterlockLedger.ILInt" Version="1.1.1" />
<PackageReference Include="InterlockLedger.Tags.ILInt" Version="1.1.3" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.2.0" />
<PackageReference Include="System.IO.Pipelines" Version="4.5.3" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion InterlockLedger.Peer2Peer/ListenerForProxying.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
******************************************************************************************************************************/

using InterlockLedger.ILInt;
using InterlockLedger.Tags;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Concurrent;
Expand Down
2 changes: 1 addition & 1 deletion InterlockLedger.Peer2Peer/MessageParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
******************************************************************************************************************************/

using InterlockLedger.ILInt;
using InterlockLedger.Tags;
using Microsoft.Extensions.Logging;
using System;
using System.Buffers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "General", "General", "{5485
.gitattributes = .gitattributes
.gitignore = .gitignore
copyright.template = copyright.template
.github\workflows\dotnetcore.yml = .github\workflows\dotnetcore.yml
LICENSE = LICENSE
.github\workflows\pushnuget.yml = .github\workflows\pushnuget.yml
README.md = README.md
EndProjectSection
EndProject
Expand Down

0 comments on commit 1366653

Please sign in to comment.