diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..5acd074d2 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,17 @@ +############################### +# Core EditorConfig Options # +############################### + +# dotnet-format requires version 3.1.37601 +# dotnet tool update -g dotnet-format +# remember to have: git config --global core.autocrlf false #(which is usually default) + +root = true + +# Every file + +[*] +insert_final_newline = true +trim_trailing_whitespace = true +charset = utf-8 +end_of_line = lf diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml new file mode 100644 index 000000000..71250ece7 --- /dev/null +++ b/.github/workflows/dotnetcore.yml @@ -0,0 +1,24 @@ +name: .NET Core Test and Publish + +on: pull_request + +env: + DOTNET_VERSION: 3.0.100 + +jobs: + + Test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v1 + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + - name: Check format + run: | + dotnet tool install --tool-path ./ dotnet-format + ./dotnet-format --check --dry-run -v diagnostic + - name: Build + run: dotnet build diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9b1df48e0..000000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: csharp - -os: - - linux - -dist: bionic -mono: none -dotnet: 3.0.100 - -script: - - dotnet restore diff --git a/RpcNep5Tracker/Helper.cs b/RpcNep5Tracker/Helper.cs index a65682e84..7e76bc44b 100644 --- a/RpcNep5Tracker/Helper.cs +++ b/RpcNep5Tracker/Helper.cs @@ -30,4 +30,4 @@ public static IEnumerable> FindRange(th v.ToArray().AsSerializable())); } } -} \ No newline at end of file +} diff --git a/RpcNep5Tracker/Nep5BalanceKey.cs b/RpcNep5Tracker/Nep5BalanceKey.cs index b4a1710cf..ec1fc218d 100644 --- a/RpcNep5Tracker/Nep5BalanceKey.cs +++ b/RpcNep5Tracker/Nep5BalanceKey.cs @@ -62,8 +62,8 @@ public void Serialize(BinaryWriter writer) public void Deserialize(BinaryReader reader) { - ((ISerializable) UserScriptHash).Deserialize(reader); - ((ISerializable) AssetScriptHash).Deserialize(reader); + ((ISerializable)UserScriptHash).Deserialize(reader); + ((ISerializable)AssetScriptHash).Deserialize(reader); } } -} \ No newline at end of file +} diff --git a/RpcNep5Tracker/Nep5Transfer.cs b/RpcNep5Tracker/Nep5Transfer.cs index 9c4b2307b..84c71f1d7 100644 --- a/RpcNep5Tracker/Nep5Transfer.cs +++ b/RpcNep5Tracker/Nep5Transfer.cs @@ -48,4 +48,4 @@ void ICloneable.FromReplica(Nep5Transfer replica) Amount = replica.Amount; } } -} \ No newline at end of file +} diff --git a/SystemLog/ConsoleColorSet.cs b/SystemLog/ConsoleColorSet.cs index e8fa58872..6ca6549bf 100644 --- a/SystemLog/ConsoleColorSet.cs +++ b/SystemLog/ConsoleColorSet.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Neo.Plugins { @@ -48,4 +48,4 @@ public void Apply() Console.BackgroundColor = Background; } } -} \ No newline at end of file +} diff --git a/SystemLog/Settings.cs b/SystemLog/Settings.cs index 939a778aa..242da4d5c 100644 --- a/SystemLog/Settings.cs +++ b/SystemLog/Settings.cs @@ -1,4 +1,4 @@ -using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Configuration; namespace Neo.Plugins { @@ -20,4 +20,4 @@ public static void Load(IConfigurationSection section) Default = new Settings(section); } } -} \ No newline at end of file +}