Skip to content

Commit

Permalink
Merge pull request #25 from chickensoft-games/refactor/cleanup
Browse files Browse the repository at this point in the history
refactor: cleanup warnings
  • Loading branch information
jolexxa authored Dec 21, 2023
2 parents cbeb42d + 45df352 commit e98355b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Chickensoft.LogicBlocks.Generator/src/LogicBlocksGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ CancellationToken token
/// inheritance hierarchy, and builds a state graph from it based on the
/// state type given to the logic block type in the inheritance hierarchy.
/// </summary>
/// <param name="logicBlockClassDecl"></param>
/// <param name="model"></param>
/// <param name="token"></param>
/// <param name="logicBlockClassDecl">Logic block class declaration.</param>
/// <param name="model">Semantic model.</param>
/// <param name="token">Cancellation token.</param>
/// <returns>Logic block graph.</returns>
public LogicBlockImplementation? DiscoverStateGraph(
ClassDeclarationSyntax logicBlockClassDecl,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public static class Extensions {
/// Normalizes line endings to '\n' or your endings.
/// Borrowed from https://github.com/HavenDV/H.Generators.Extensions (MIT)
/// </summary>
/// <param name="text"></param>
/// <param name="text">Text to normalize.</param>
/// <param name="newLine">'\n' by default</param>
/// <returns>String with normalized line endings.</returns>
/// <exception cref="ArgumentNullException"></exception>
Expand Down Expand Up @@ -41,7 +41,9 @@ public static string Clean(this string text, string? newLine = null) {
}

var escaped = Regex.Escape(newLine);
#pragma warning disable RCS1262
var regex = new Regex($$"""({{escaped}}){3,}""");
#pragma warning restore RCS1262

return regex.Replace(string.Join(newLine, lines), newLine);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
namespace Chickensoft.LogicBlocks.Tests;


using Chickensoft.LogicBlocks.Tests.Fixtures;
using Moq;
using Shouldly;
Expand All @@ -15,7 +14,6 @@ public void SimulatesAnInput() {

var consumer = new LogicBlockConsumer(logic.Object);


binding.Input(new MyLogicBlock.Input.SomeInput());

consumer.SawInput.ShouldBeTrue();
Expand Down

0 comments on commit e98355b

Please sign in to comment.