name: 'Editor Config format check'

on:
  pull_request:
    branches: [master]

permissions:
  contents: read

jobs:
  validate:
    name: Validate Editor Config formatting
    runs-on: 'ubuntu-latest'
    steps:
    - name: Checkout PR head branch
      uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
      with:
        fetch-depth: 0
    - name: Editor Config Validation against PR base commit
      uses: github/super-linter/slim@962a6409c1b303d0e53a9d34ada577a0362f4fae # v5.2.1
      env:
        VALIDATE_ALL_CODEBASE: false
        VALIDATE_EDITORCONFIG: true
        DEFAULT_BRANCH: ${{ github.event.pull_request.base.sha }}
