# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# SPDX-License-Identifier: curl

name: Codespell

on:
  push:
    branches:
      - master
      - '*/ci'
    paths:
      - 'lib/**'
      - 'src/**'
      - 'include/**'
  pull_request:
    branches:
      - master
      - 'lib/**'
      - 'src/**'
      - 'include/**'

permissions: {}

jobs:
  codespell:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

      - name: install
        run: |
          sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
          sudo apt-get update
          sudo apt-get install codespell

      - name: spellcheck
        run: codespell --skip src/tool_hugehelp.c -I .github/scripts/codespell-ignore.txt include src lib
