From aa721e5421bb6a58870b2c8f0a7965165301d6fe Mon Sep 17 00:00:00 2001 From: Judsin1349 Date: Mon, 6 Oct 2025 08:40:41 -0500 Subject: [PATCH 1/8] added an actions workflow --- .config/dotnet-tools.json | 13 ++++++++ .github/workflows/verify-format.yml | 46 +++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 .config/dotnet-tools.json create mode 100644 .github/workflows/verify-format.yml diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json new file mode 100644 index 0000000..7fbe0aa --- /dev/null +++ b/.config/dotnet-tools.json @@ -0,0 +1,13 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "dotnet-format": { + "version": "5.1.250801", + "commands": [ + "dotnet-format" + ], + "rollForward": false + } + } +} \ No newline at end of file diff --git a/.github/workflows/verify-format.yml b/.github/workflows/verify-format.yml new file mode 100644 index 0000000..a2cbb96 --- /dev/null +++ b/.github/workflows/verify-format.yml @@ -0,0 +1,46 @@ +name: Verify Code Format + +on: + pull_request: + push: + branches: [main] + +jobs: + check-formatting: + name: Check .NET Formatting + runs-on: ubuntu-latest + + steps: + # --------------------------- + # 1. Checkout the repository + # --------------------------- + - name: Checkout repository + uses: actions/checkout@v4 + + # --------------------------- + # 2. Setup .NET SDK + # --------------------------- + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + + # --------------------------- + # 3. Restore the dotnet-format tool + # --------------------------- + # This restores the version defined in .config/dotnet-tools.json + - name: Restore .NET tools + run: dotnet tool restore + + # --------------------------- + # 4. Run the format check + # --------------------------- + - name: Create temporary solution + run: | + dotnet new sln --name TempSolution + for csproj in $(find . -name "*.csproj"); do + dotnet sln TempSolution.sln add "$csproj" + done + + - name: Verify formatting + run: dotnet format TempSolution.sln --verify-no-changes --verbosity minimal \ No newline at end of file From 6eb652d4e6c32e0f2433ffbd3af05f9b51a7ce5c Mon Sep 17 00:00:00 2001 From: Judsin1349 Date: Mon, 6 Oct 2025 09:15:42 -0500 Subject: [PATCH 2/8] testing action pipeline with bad code commit --- Samples/Scripts/PlayerControllerExample.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Samples/Scripts/PlayerControllerExample.cs b/Samples/Scripts/PlayerControllerExample.cs index 1bf9897..4a15f51 100644 --- a/Samples/Scripts/PlayerControllerExample.cs +++ b/Samples/Scripts/PlayerControllerExample.cs @@ -54,6 +54,8 @@ public sealed class PlayerControllerExample : MonoBehaviour, IDebuggingInfo { // What direction is up from the player? public Vector3 planarUp { get; private set; } + public void Foo() { } + private void Awake() { planarUp = transform.up; From 868ea7af51a94cb2c6bfe15754ba07829c6e3ccb Mon Sep 17 00:00:00 2001 From: Judsin1349 Date: Mon, 6 Oct 2025 09:59:22 -0500 Subject: [PATCH 3/8] updated the verify-formatter to include roslyn analysis --- .github/workflows/verify-format.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/verify-format.yml b/.github/workflows/verify-format.yml index a2cbb96..3e9cfee 100644 --- a/.github/workflows/verify-format.yml +++ b/.github/workflows/verify-format.yml @@ -43,4 +43,7 @@ jobs: done - name: Verify formatting - run: dotnet format TempSolution.sln --verify-no-changes --verbosity minimal \ No newline at end of file + run: dotnet format TempSolution.sln --verify-no-changes --severity error --verbosity detailed + + - name: Run analyzers + run: dotnet build --no-restore -warnaserror /warnaserror+:IDE* \ No newline at end of file From b901a7f3bda98410c8df89ba2ce1ea9b18bfb887 Mon Sep 17 00:00:00 2001 From: Judsin1349 Date: Mon, 6 Oct 2025 10:03:01 -0500 Subject: [PATCH 4/8] fixed a key error --- .github/workflows/verify-format.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/verify-format.yml b/.github/workflows/verify-format.yml index 3e9cfee..0cd292d 100644 --- a/.github/workflows/verify-format.yml +++ b/.github/workflows/verify-format.yml @@ -46,4 +46,4 @@ jobs: run: dotnet format TempSolution.sln --verify-no-changes --severity error --verbosity detailed - name: Run analyzers - run: dotnet build --no-restore -warnaserror /warnaserror+:IDE* \ No newline at end of file + run: dotnet build --no-restore -warnaserror \ No newline at end of file From 7201777c7e86b25042b6c07eb6f97455de7b6bd8 Mon Sep 17 00:00:00 2001 From: Judsin1349 Date: Mon, 6 Oct 2025 12:58:54 -0500 Subject: [PATCH 5/8] testing super linter --- .github/workflows/verify-format.yml | 54 +++++++++-------------------- 1 file changed, 17 insertions(+), 37 deletions(-) diff --git a/.github/workflows/verify-format.yml b/.github/workflows/verify-format.yml index 0cd292d..7622c46 100644 --- a/.github/workflows/verify-format.yml +++ b/.github/workflows/verify-format.yml @@ -1,4 +1,4 @@ -name: Verify Code Format +name: Super Linter on: pull_request: @@ -6,44 +6,24 @@ on: branches: [main] jobs: - check-formatting: - name: Check .NET Formatting + lint: + name: Lint Code Base runs-on: ubuntu-latest steps: - # --------------------------- - # 1. Checkout the repository - # --------------------------- - - name: Checkout repository + - name: Checkout code uses: actions/checkout@v4 - - # --------------------------- - # 2. Setup .NET SDK - # --------------------------- - - name: Setup .NET - uses: actions/setup-dotnet@v4 with: - dotnet-version: 8.0.x - - # --------------------------- - # 3. Restore the dotnet-format tool - # --------------------------- - # This restores the version defined in .config/dotnet-tools.json - - name: Restore .NET tools - run: dotnet tool restore - - # --------------------------- - # 4. Run the format check - # --------------------------- - - name: Create temporary solution - run: | - dotnet new sln --name TempSolution - for csproj in $(find . -name "*.csproj"); do - dotnet sln TempSolution.sln add "$csproj" - done - - - name: Verify formatting - run: dotnet format TempSolution.sln --verify-no-changes --severity error --verbosity detailed - - - name: Run analyzers - run: dotnet build --no-restore -warnaserror \ No newline at end of file + fetch-depth: 0 + + - name: Run Super Linter + uses: github/super-linter/slim@v6 + env: + VALIDATE_ALL_CODEBASE: true # Lint the entire repo, not just changed files + DEFAULT_BRANCH: main + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VALIDATE_CSHARP: true + VALIDATE_YAML: true + VALIDATE_JSON: false + VALIDATE_MARKDOWN: false + SUPPRESS_WARNINGS: false \ No newline at end of file From 0cd03ade5a47bc4a939ca9a7778911f3c25e9014 Mon Sep 17 00:00:00 2001 From: Judsin1349 Date: Mon, 6 Oct 2025 13:05:55 -0500 Subject: [PATCH 6/8] updated the linter --- .github/workflows/verify-format.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/verify-format.yml b/.github/workflows/verify-format.yml index 7622c46..7499eb3 100644 --- a/.github/workflows/verify-format.yml +++ b/.github/workflows/verify-format.yml @@ -23,7 +23,4 @@ jobs: DEFAULT_BRANCH: main GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} VALIDATE_CSHARP: true - VALIDATE_YAML: true - VALIDATE_JSON: false - VALIDATE_MARKDOWN: false SUPPRESS_WARNINGS: false \ No newline at end of file From db46714eb44e2b7a7c7c72a2fae75caae8a7adfb Mon Sep 17 00:00:00 2001 From: Judsin1349 Date: Mon, 6 Oct 2025 13:14:42 -0500 Subject: [PATCH 7/8] minor updates. linting is no more. --- .github/FUNDING.yml | 10 ++++++++++ .github/workflows/verify-format.yml | 26 -------------------------- 2 files changed, 10 insertions(+), 26 deletions(-) create mode 100644 .github/FUNDING.yml delete mode 100644 .github/workflows/verify-format.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..0d27c03 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,10 @@ +github: Spell-Bound-Studios +patreon: SpellboundStudiosInc +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with paypal \ No newline at end of file diff --git a/.github/workflows/verify-format.yml b/.github/workflows/verify-format.yml deleted file mode 100644 index 7499eb3..0000000 --- a/.github/workflows/verify-format.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Super Linter - -on: - pull_request: - push: - branches: [main] - -jobs: - lint: - name: Lint Code Base - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Run Super Linter - uses: github/super-linter/slim@v6 - env: - VALIDATE_ALL_CODEBASE: true # Lint the entire repo, not just changed files - DEFAULT_BRANCH: main - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - VALIDATE_CSHARP: true - SUPPRESS_WARNINGS: false \ No newline at end of file From 6b0d0d324266f23214fad219a22121e3a4d3a61e Mon Sep 17 00:00:00 2001 From: Judsin1349 Date: Mon, 6 Oct 2025 13:16:34 -0500 Subject: [PATCH 8/8] added a yml and removed bad code from example --- Samples/Scripts/PlayerControllerExample.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Samples/Scripts/PlayerControllerExample.cs b/Samples/Scripts/PlayerControllerExample.cs index 4a15f51..1bf9897 100644 --- a/Samples/Scripts/PlayerControllerExample.cs +++ b/Samples/Scripts/PlayerControllerExample.cs @@ -54,8 +54,6 @@ public sealed class PlayerControllerExample : MonoBehaviour, IDebuggingInfo { // What direction is up from the player? public Vector3 planarUp { get; private set; } - public void Foo() { } - private void Awake() { planarUp = transform.up;