Эх сурвалжийг харах

Split formatting workflow into separate language-specific workflows

- Add individual workflows for C++, C#, Dart, Haxe, Java, and TypeScript
- Each workflow runs independently for faster testing and debugging
- Rename original workflow to indicate it's the combined version

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Mario Zechner 1 сар өмнө
parent
commit
bc9732f0a1

+ 22 - 0
.github/workflows/format-check-cpp.yml

@@ -0,0 +1,22 @@
+name: Check C++ Formatting
+
+on:
+  push:
+  workflow_dispatch:
+
+jobs:
+  check-cpp:
+    runs-on: ubuntu-24.04
+    steps:
+    - uses: actions/checkout@v3
+    
+    - name: Setup clang-format
+      run: ./formatters/setup-clang-format-docker.sh
+
+    - name: Format C++
+      run: ./formatters/format-cpp.sh
+
+    - name: Check for changes
+      run: |
+        git ls-files -m
+        if [[ `git ls-files -m` ]]; then echo "Detected C++ formatting errors!" & exit 1; fi

+ 24 - 0
.github/workflows/format-check-csharp.yml

@@ -0,0 +1,24 @@
+name: Check C# Formatting
+
+on:
+  push:
+  workflow_dispatch:
+
+jobs:
+  check-csharp:
+    runs-on: ubuntu-24.04
+    steps:
+    - uses: actions/checkout@v3
+    
+    - name: Install dotnet
+      uses: actions/setup-dotnet@v3
+      with:
+          dotnet-version: "8.0.x"
+
+    - name: Format C#
+      run: ./formatters/format-csharp.sh
+
+    - name: Check for changes
+      run: |
+        git ls-files -m
+        if [[ `git ls-files -m` ]]; then echo "Detected C# formatting errors!" & exit 1; fi

+ 28 - 0
.github/workflows/format-check-dart.yml

@@ -0,0 +1,28 @@
+name: Check Dart Formatting
+
+on:
+  push:
+  workflow_dispatch:
+
+jobs:
+  check-dart:
+    runs-on: ubuntu-24.04
+    steps:
+    - uses: actions/checkout@v3
+    
+    - name: Install Dart
+      uses: dart-lang/setup-dart@v1
+      with:
+        sdk: '3.8.1'
+
+    - name: Check dart format version
+      run: |
+        dart format --version
+
+    - name: Format Dart
+      run: ./formatters/format-dart.sh
+
+    - name: Check for changes
+      run: |
+        git ls-files -m
+        if [[ `git ls-files -m` ]]; then echo "Detected Dart formatting errors!" & exit 1; fi

+ 25 - 0
.github/workflows/format-check-haxe.yml

@@ -0,0 +1,25 @@
+name: Check Haxe Formatting
+
+on:
+  push:
+  workflow_dispatch:
+
+jobs:
+  check-haxe:
+    runs-on: ubuntu-24.04
+    steps:
+    - uses: actions/checkout@v3
+    
+    - name: Install Haxe
+      uses: krdlab/setup-haxe@v1
+      with:
+        haxe-version: '4.3.2'
+    - run: haxelib install formatter
+
+    - name: Format Haxe
+      run: ./formatters/format-haxe.sh
+
+    - name: Check for changes
+      run: |
+        git ls-files -m
+        if [[ `git ls-files -m` ]]; then echo "Detected Haxe formatting errors!" & exit 1; fi

+ 25 - 0
.github/workflows/format-check-java.yml

@@ -0,0 +1,25 @@
+name: Check Java Formatting
+
+on:
+  push:
+  workflow_dispatch:
+
+jobs:
+  check-java:
+    runs-on: ubuntu-24.04
+    steps:
+    - uses: actions/checkout@v3
+    
+    - name: Install JDK
+      uses: actions/setup-java@v3
+      with:
+        distribution: 'zulu'
+        java-version: "16"
+
+    - name: Format Java
+      run: ./formatters/format-java.sh
+
+    - name: Check for changes
+      run: |
+        git ls-files -m
+        if [[ `git ls-files -m` ]]; then echo "Detected Java formatting errors!" & exit 1; fi

+ 24 - 0
.github/workflows/format-check-typescript.yml

@@ -0,0 +1,24 @@
+name: Check TypeScript Formatting
+
+on:
+  push:
+  workflow_dispatch:
+
+jobs:
+  check-typescript:
+    runs-on: ubuntu-24.04
+    steps:
+    - uses: actions/checkout@v3
+    
+    - name: Install Node and dependencies
+      uses: actions/setup-node@v3
+      with:
+        node-version: "24"
+
+    - name: Format TypeScript
+      run: ./formatters/format-ts.sh
+
+    - name: Check for changes
+      run: |
+        git ls-files -m
+        if [[ `git ls-files -m` ]]; then echo "Detected TypeScript formatting errors!" & exit 1; fi

+ 1 - 1
.github/workflows/format-check.yml

@@ -1,4 +1,4 @@
-name: Check Formatting
+name: Check All Formatting (Combined)
 
 on:
   push:

+ 0 - 90
.github/workflows/format-debug.yml

@@ -1,90 +0,0 @@
-name: Debug Formatting Issues
-
-on:
-  workflow_dispatch:
-
-jobs:
-  debug:
-    runs-on: ubuntu-24.04
-    steps:
-
-    - uses: actions/checkout@v3
-
-    - name: Setup clang-format
-      run: ./formatters/setup-clang-format-docker.sh
-
-    - name: Install dotnet
-      uses: actions/setup-dotnet@v3
-      with:
-          dotnet-version: "8.0.x"
-
-    - name: Install Node and dependencies
-      uses: actions/setup-node@v3
-      with:
-        node-version: "24"
-
-    - name: Install JDK
-      uses: actions/setup-java@v3
-      with:
-        distribution: 'zulu'
-        java-version: "16"
-
-    - name: Install Haxe
-      uses: krdlab/setup-haxe@v1
-      with:
-        haxe-version: '4.3.2'
-    - run: haxelib install formatter
-
-    - name: Install Dart
-      uses: dart-lang/setup-dart@v1
-      with:
-        sdk: '3.8.1'
-
-    - name: Show environment info
-      run: |
-        echo "=== Dart Version ==="
-        dart --version
-        echo "=== Dart Format Version ==="
-        dart format --version
-        echo "=== Git Status Before ==="
-        git status --porcelain
-        echo "=== OS Info ==="
-        uname -a
-        lsb_release -a
-
-    - name: Show specific Flutter files before formatting
-      run: |
-        echo "=== Sample Flutter files before formatting ==="
-        head -10 spine-flutter/lib/extensions.dart || echo "File not found"
-        head -10 spine-flutter/lib/spine_dart.dart || echo "File not found"
-
-    - name: Run Dart formatter only
-      run: |
-        echo "=== Running Dart formatter ==="
-        ./formatters/format-dart.sh
-        echo "=== Git status after Dart formatting ==="
-        git status --porcelain
-        echo "=== Modified files ==="
-        git ls-files -m
-
-    - name: Show diff for first few files
-      run: |
-        echo "=== Showing diffs for first 3 modified files ==="
-        for file in $(git ls-files -m | head -3); do
-          echo "--- Diff for $file ---"
-          git diff "$file" | head -50
-          echo ""
-        done
-
-    - name: Archive all diffs
-      run: |
-        git diff > all-format-diffs.txt
-        git status --porcelain > git-status.txt
-
-    - name: Upload debug artifacts
-      uses: actions/upload-artifact@v4
-      with:
-        name: format-debug-artifacts
-        path: |
-          all-format-diffs.txt
-          git-status.txt