From e156075b1566e085d8e56cc79c94b2f016628198 Mon Sep 17 00:00:00 2001 From: Bernd Schubert Date: Wed, 1 Jan 2025 22:58:45 +0100 Subject: Add a checkpatch.pl github workflow Signed-off-by: Bernd Schubert --- .github/workflows/checkpatch.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/checkpatch.yml (limited to '.github/workflows') diff --git a/.github/workflows/checkpatch.yml b/.github/workflows/checkpatch.yml new file mode 100644 index 0000000..9a3cd1b --- /dev/null +++ b/.github/workflows/checkpatch.yml @@ -0,0 +1,22 @@ +name: Checkpatch + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + checkpatch: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + fetch-depth: 0 + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y perl + - name: Run checkpatch.pl + run: | + git fetch origin ${{ github.base_ref }} + base_commit=$(git merge-base FETCH_HEAD ${{ github.event.pull_request.head.sha }}) + ./checkpatch.pl --no-tree -g $base_commit -- cgit v1.2.3