kind: pipeline
type: docker
name: clang format
clone:
  recursive: true
  submodule_update_remote: true

trigger:
  branch:
  - main

steps:
- name: clang format
  image: clang_format:latest
  pull: if-not-exists
  commands:
    - |
      set -e
      clang-format --version

      find ./modules -name '*.?pp' | while read -r file; do
        echo "Checking format for $file"
        if ! clang-format --dry-run --Werror "$file"; then
          echo "❌ Formatting issue detected in $file"
          exit 1
        fi
      done

      echo "✅ All files are properly formatted"

---

kind: pipeline
type: docker
name: static analysis
clone:
  recursive: true
  submodule_update_remote: true

trigger:
  branch:
  - main

steps:
- name: static_analysis
  image: static_analysis:latest
  pull: if-not-exists
  privileged: true
  commands:
    - conan build . -s build_type=Release -o enable_static_analysis=True --build=missing
