From dd6df0a2f0aa2c533584c58804859df54c03e2eb Mon Sep 17 00:00:00 2001 From: "gstraccini[bot]" <150967461+gstraccini[bot]@users.noreply.github.com> Date: Sat, 26 Oct 2024 03:40:06 +0000 Subject: [PATCH] CSharpier format --- src/commit_message_processor.cs | 5 +++-- tests/commit_message_processor_tests.cs | 12 +++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/commit_message_processor.cs b/src/commit_message_processor.cs index e4765c5d..5bd23ecc 100644 --- a/src/commit_message_processor.cs +++ b/src/commit_message_processor.cs @@ -3,7 +3,8 @@ public class CommitMessageProcessor { - private static readonly string semverPattern = @"\+semver:\s?(breaking|major|feature|minor|fix|patch|none|skip)"; + private static readonly string semverPattern = + @"\+semver:\s?(breaking|major|feature|minor|fix|patch|none|skip)"; public static string ProcessCommitMessage(string originalMessage) { @@ -32,6 +33,6 @@ public static void Main(string[] args) } } -// Note: This is a basic implementation. In a real-world scenario, +// Note: This is a basic implementation. In a real-world scenario, // you would integrate this into your commit handling workflow. // Additionally, you would write unit tests to validate the behavior. diff --git a/tests/commit_message_processor_tests.cs b/tests/commit_message_processor_tests.cs index f995b587..f0a66a8c 100644 --- a/tests/commit_message_processor_tests.cs +++ b/tests/commit_message_processor_tests.cs @@ -4,9 +4,15 @@ public class CommitMessageProcessorTests { [Theory] - [InlineData("+semver: minor Initial commit with some features", "Initial commit with some features +semver: minor")] + [InlineData( + "+semver: minor Initial commit with some features", + "Initial commit with some features +semver: minor" + )] [InlineData("Fixing bug +semver: patch", "Fixing bug +semver: patch")] - [InlineData("+semver: major Breaking changes introduced", "Breaking changes introduced +semver: major")] + [InlineData( + "+semver: major Breaking changes introduced", + "Breaking changes introduced +semver: major" + )] [InlineData("Refactoring code +semver: none", "Refactoring code +semver: none")] [InlineData("No version bump here", "No version bump here")] public void TestProcessCommitMessage(string originalMessage, string expectedProcessedMessage) @@ -43,5 +49,5 @@ public void TestProcessCommitMessageWithWhitespaceOnly() } } -// Note: This is a basic set of tests. In a real-world scenario, +// Note: This is a basic set of tests. In a real-world scenario, // you would expand these tests to cover more edge cases and scenarios.