Skip to content

Commit

Permalink
Run dotnet format whitespace (#90)
Browse files Browse the repository at this point in the history
* Add dotnet format to actions
  • Loading branch information
chtenb authored Aug 26, 2024
1 parent 1b1fb6d commit 93e1e12
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 9 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ jobs:
- name: Check if README is up-to-date
run: git diff --exit-code -- README.md

- name: Check if code is formatted
run: dotnet format whitespace --verify-no-changes -v diag Rubjerg.Graphviz.sln

- name: Check if code is formatted
run: dotnet format whitespace --verify-no-changes -v diag Rubjerg.Graphviz.NugetTests.sln

- name: Run Unittests With Coverage Calculation (.NET 4.8)

run: packages\opencover\4.7.1221\tools\OpenCover.Console.exe -skipautoprops -returntargetcode -register '-target:bash.exe' -targetargs:'nunit-console.sh Rubjerg.Graphviz.Test\bin\x64\Release\net48\Rubjerg.Graphviz.Test.dll' '-filter:+[Rubjerg*]* -[Rubjerg.Graphviz.Test*]*'
Expand Down
2 changes: 1 addition & 1 deletion Rubjerg.Graphviz.NugetTest/TestNugetPackage.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Linq;
using System.Linq;
using NUnit.Framework;

namespace Rubjerg.Graphviz.NugetTest
Expand Down
2 changes: 1 addition & 1 deletion Rubjerg.Graphviz.Test/CGraphIntegrationTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;

Expand Down
2 changes: 1 addition & 1 deletion Rubjerg.Graphviz.Test/CGraphStressTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using NUnit.Framework;
using NUnit.Framework;

namespace Rubjerg.Graphviz.Test;

Expand Down
4 changes: 2 additions & 2 deletions Rubjerg.Graphviz.Test/TestDotLayout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -309,14 +309,14 @@ public void TestOutputFormatsConsistency()

{
root.ToXDotFile(testFile);
var fileContent = File.ReadAllText(testFile).Replace("\r\n", "\n");;
var fileContent = File.ReadAllText(testFile).Replace("\r\n", "\n");
var stringContent = root.CreateLayout().ToDotString();
Assert.AreEqual(fileContent, stringContent);
}

{
root.ToSvgFile(testFile);
var fileContent = File.ReadAllText(testFile).Replace("\r\n", "\n");;
var fileContent = File.ReadAllText(testFile).Replace("\r\n", "\n");
var stringContent = root.ToSvgString();
Assert.AreEqual(fileContent, stringContent);
}
Expand Down
2 changes: 1 addition & 1 deletion Rubjerg.Graphviz.TransitiveNugetTest/TestNugetPackage.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Linq;
using System.Linq;
using NUnit.Framework;

namespace Rubjerg.Graphviz.NugetTest
Expand Down
2 changes: 1 addition & 1 deletion Rubjerg.Graphviz.TransitiveTest/TestReference.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Linq;
using System.Linq;
using NUnit.Framework;

namespace Rubjerg.Graphviz.NugetTest;
Expand Down
2 changes: 1 addition & 1 deletion Rubjerg.Graphviz/CGraphThing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public string SafeGetAttribute(string name, string deflt)
return GetAttribute(name)!;
return deflt;
}

/// <summary>
/// Get the attribute if it was introduced and contains a non-empty value, otherwise return null.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion Rubjerg.Graphviz/Node.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ internal static Node GetOrCreate(Graph graph, string name)
/// Identifier for this node.
/// </summary>
public new string GetName() => base.GetName()!;

/// <summary>
/// Introduces an attribute for nodes in the given graph by giving a default value.
/// A given default can be overwritten by calling this method again.
Expand Down

0 comments on commit 93e1e12

Please sign in to comment.