From cc80632fa794c2e103358d5eab118100127ab405 Mon Sep 17 00:00:00 2001 From: Nelson Nobre Date: Mon, 2 Jun 2025 15:41:24 +0100 Subject: [PATCH 1/9] ci: fix typo 'nuget-vulnerabilites.yml' --- .github/workflows/nuget-vulnerabilites.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nuget-vulnerabilites.yml b/.github/workflows/nuget-vulnerabilites.yml index c889c74..f32f7f6 100644 --- a/.github/workflows/nuget-vulnerabilites.yml +++ b/.github/workflows/nuget-vulnerabilites.yml @@ -1,4 +1,4 @@ -name: 'NuGet vulnerabilites' +name: 'NuGet vulnerabilities' on: From 57f07699910f1875e32a58dec95c82a82a9d09e8 Mon Sep 17 00:00:00 2001 From: Nelson Nobre Date: Mon, 2 Jun 2025 16:00:48 +0100 Subject: [PATCH 2/9] docs: update contributing guidelines --- CONTRIBUTING.md | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 92df32b..46f0334 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,13 +3,13 @@ We would love for you to contribute to this project and help make it even better than it is today! As a contributor, here are the guidelines we would like you to follow. It does help everyone to accept your Pull Requests with maximum awesomeness: -- [Code of Conduct](#code-of-conduct) -- [General Seps](#general-seps) -- [Commits and Pull Requests](#commits-pr) - - [Conventional Commits](#conventional-commits) - - [Common types you can use](#commits-types) -- [Coding Standards](#coding-standards) -- [Tests](#tests) +- [ Code of Conduct](#-code-of-conduct) +- [ General Seps](#-general-seps) +- [ Commits and Pull Requests](#-commits-and-pull-requests) + - [ Conventional Commits](#-conventional-commits) + - [ Common types you can use (based on the Angular convention):](#-common-types-you-can-use-based-on-the-angular-convention) +- [ Coding Standards](#-coding-standards) +- [ Tests](#-tests) @@ -82,7 +82,7 @@ feat(blog): add comment section ## Coding Standards * :heavy_check_mark: **DO** add XML comment documentation to new classes, methods or parameters. -* :heavy_check_mark: **DO** add a test class for each feature and a test method for each +* :heavy_check_mark: **DO** add a test class for each feature and a test method for each * :heavy_check_mark: **DO** use language conventions to make code easy to understand quickly. See some tips here: [dofactory](https://www.dofactory.com/csharp-coding-standards); * :heavy_check_mark: **CONSIDER** using SOLID patterns; @@ -94,8 +94,3 @@ feat(blog): add comment section * :heavy_check_mark: **DO** add a test class for each feature and a test method for each assertion; * :heavy_check_mark: **DO** make sure unit tests pass. * :x: **AVOID** adding tests just to get coverage on sonarcloud. - -***Disclaimer*** -- 1️⃣ Unit in Unit Test is not a method/function. -- 2️⃣ One assertion per test doesn't mean invoking the Assert method only once. -> by @gsferreira From cb985794347717b71ae7782db9f97c089819d46d Mon Sep 17 00:00:00 2001 From: Nelson Nobre Date: Wed, 4 Jun 2025 10:08:26 +0100 Subject: [PATCH 3/9] docs: update contributing guidelines --- CONTRIBUTING.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 46f0334..ba0673c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -94,3 +94,7 @@ feat(blog): add comment section * :heavy_check_mark: **DO** add a test class for each feature and a test method for each assertion; * :heavy_check_mark: **DO** make sure unit tests pass. * :x: **AVOID** adding tests just to get coverage on sonarcloud. + +***Disclaimer*** +- 1️⃣ Unit in Unit Test is not a method/function. +- 2️⃣ One assertion per test doesn't mean invoking the Assert method only once. From 490f8522cafb358c2dfc69f781e487680e32813a Mon Sep 17 00:00:00 2001 From: Nelson Nobre Date: Thu, 12 Jun 2025 08:48:21 +0100 Subject: [PATCH 4/9] ci: refactor vulnerability check workflow --- .../{nuget-vulnerabilites.yml => vulnerability-check.yml} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename .github/workflows/{nuget-vulnerabilites.yml => vulnerability-check.yml} (86%) diff --git a/.github/workflows/nuget-vulnerabilites.yml b/.github/workflows/vulnerability-check.yml similarity index 86% rename from .github/workflows/nuget-vulnerabilites.yml rename to .github/workflows/vulnerability-check.yml index f32f7f6..803264d 100644 --- a/.github/workflows/nuget-vulnerabilites.yml +++ b/.github/workflows/vulnerability-check.yml @@ -1,4 +1,4 @@ -name: 'NuGet vulnerabilities' +name: 'Vulnerability Check' on: @@ -16,8 +16,8 @@ on: jobs: - sonar-scanner: - name: "NuGet vulnerabilites" + nuget-vulnerabilities-check: + name: "NuGet vulnerabilities" runs-on: ubuntu-latest steps: @@ -35,7 +35,7 @@ jobs: - name: "Build" run: dotnet build --configuration Release --no-restore - - name: "Checking NuGet vulnerabilites" + - name: "Checking NuGet vulnerabilities" run: | dotnet list package --vulnerable --include-transitive 2>&1 | tee build.log echo "Analyze dotnet list package command log output..." From cfec53d314c1e6658fabd2360ebea1306597f924 Mon Sep 17 00:00:00 2001 From: Nelson Nobre Date: Thu, 12 Jun 2025 10:28:12 +0100 Subject: [PATCH 5/9] ci: update job name for markdown link check workflow --- .github/workflows/markdown-link-check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/markdown-link-check.yml b/.github/workflows/markdown-link-check.yml index a9f6253..c82bd19 100644 --- a/.github/workflows/markdown-link-check.yml +++ b/.github/workflows/markdown-link-check.yml @@ -16,6 +16,7 @@ on: jobs: markdown-link-check: + name: "Markdown link check" runs-on: ubuntu-latest steps: From ce762a793398b5784d99182060e29154b793a1cd Mon Sep 17 00:00:00 2001 From: Nelson Nobre Date: Thu, 12 Jun 2025 10:56:17 +0100 Subject: [PATCH 6/9] ci: rename test job from "Test nuget" to "Test project" --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3ee715b..2ffef6b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,7 +29,7 @@ env: jobs: test-project: - name: "Test nuget" + name: "Test project" runs-on: ubuntu-22.04 permissions: contents: read From b678cd1fd72c5cacfb2e1836cc01f680c938f9aa Mon Sep 17 00:00:00 2001 From: Nelson Nobre Date: Thu, 12 Jun 2025 11:26:35 +0100 Subject: [PATCH 7/9] docs: fix typo in general steps section of contributing guidelines --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ba0673c..57322cc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,7 @@ We would love for you to contribute to this project and help make it even better As a contributor, here are the guidelines we would like you to follow. It does help everyone to accept your Pull Requests with maximum awesomeness: - [ Code of Conduct](#-code-of-conduct) -- [ General Seps](#-general-seps) +- [ General Steps](#-general-steps) - [ Commits and Pull Requests](#-commits-and-pull-requests) - [ Conventional Commits](#-conventional-commits) - [ Common types you can use (based on the Angular convention):](#-common-types-you-can-use-based-on-the-angular-convention) @@ -19,7 +19,7 @@ Please read and follow our [Code of Conduct][coc]. -## General Seps +## General Steps 1. Check if there is already an open issue for the subject; 2. Open an issue to discuss the new feature; From e0c41a979d951c20d9f45d901cdf8e778294f0e3 Mon Sep 17 00:00:00 2001 From: Nelson Nobre Date: Thu, 12 Jun 2025 11:39:00 +0100 Subject: [PATCH 8/9] docs: fix formatting inconsistencies in contributing guidelines --- CONTRIBUTING.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 57322cc..4e7433f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,23 +3,23 @@ We would love for you to contribute to this project and help make it even better than it is today! As a contributor, here are the guidelines we would like you to follow. It does help everyone to accept your Pull Requests with maximum awesomeness: -- [ Code of Conduct](#-code-of-conduct) -- [ General Steps](#-general-steps) -- [ Commits and Pull Requests](#-commits-and-pull-requests) - - [ Conventional Commits](#-conventional-commits) - - [ Common types you can use (based on the Angular convention):](#-common-types-you-can-use-based-on-the-angular-convention) -- [ Coding Standards](#-coding-standards) -- [ Tests](#-tests) +- [Code of Conduct](#code-of-conduct) +- [General Steps](#general-steps) +- [Commits and Pull Requests](#commits-and-pull-requests) + - [Conventional Commits](#conventional-commits) + - [Common types you can use (based on the Angular convention)](#common-types-you-can-use-based-on-the-angular-convention) +- [Coding Standards](#coding-standards) +- [Tests](#tests) -## Code of Conduct +## Code of Conduct Please read and follow our [Code of Conduct][coc]. -## General Steps +## General Steps 1. Check if there is already an open issue for the subject; 2. Open an issue to discuss the new feature; @@ -31,14 +31,14 @@ Please read and follow our [Code of Conduct][coc]. 8. Submit a pull request; -## Commits and Pull Requests +## Commits and Pull Requests * :x: **AVOID** breaking the continuous integration build. * :heavy_check_mark: **DO** atomic commits to make it easier to analyze changes. * :heavy_check_mark: **DO** keep pull requests small so they can be easily reviewed. * :heavy_check_mark: **DO** only commit with conventional commit patterns -### Conventional Commits +### Conventional Commits To know more about conventional commits, visit [Conventional Commits](https://conventionalcommits.org/). In general the pattern mostly looks like this: @@ -63,7 +63,7 @@ fix(server): send cors headers feat(blog): add comment section ``` -#### Common types you can use (based on the Angular convention): +#### Common types you can use (based on the Angular convention) - `feat:` A new feature - `fix:` A bug fix @@ -80,7 +80,7 @@ feat(blog): add comment section -## Coding Standards +## Coding Standards * :heavy_check_mark: **DO** add XML comment documentation to new classes, methods or parameters. * :heavy_check_mark: **DO** add a test class for each feature and a test method for each * :heavy_check_mark: **DO** use language conventions to make code easy to understand quickly. See some tips here: [dofactory](https://www.dofactory.com/csharp-coding-standards); @@ -88,7 +88,7 @@ feat(blog): add comment section -## Tests +## Tests * :heavy_check_mark: **DO** add a unit test if your Pull Requests resolves an issue or adds features. * :heavy_check_mark: **CONSIDER** using test patterns like "AAA" and "Given When Then"; * :heavy_check_mark: **DO** add a test class for each feature and a test method for each assertion; From 1570639093015a1fe0d1c45ad115f9ddc5756c92 Mon Sep 17 00:00:00 2001 From: Nelson Nobre Date: Thu, 12 Jun 2025 12:00:09 +0100 Subject: [PATCH 9/9] ci: update max length for commit messages to 72 characters --- .github/hooks/commit-msg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/hooks/commit-msg b/.github/hooks/commit-msg index b196b72..bb66012 100644 --- a/.github/hooks/commit-msg +++ b/.github/hooks/commit-msg @@ -31,7 +31,7 @@ if ! head -1 "$1" | grep -qE "^(build|chore|ci|docs|feat|fix|perf|refactor|rever echo "For more information check https://www.conventionalcommits.org/en/v1.0.0/ for more details" >&2 exit 1 fi -if ! head -1 "$1" | grep -qE "^.{9,85}$"; then - echo "Aborting commit. Your commit message is too long. Max length is 89 characters" >&2 +if ! head -1 "$1" | grep -qE "^.{9,72}$"; then + echo "Aborting commit. Your commit message is too long. Max length is 72 characters" >&2 exit 1 -fi \ No newline at end of file +fi