diff --git a/.checkpatch.conf b/.checkpatch.conf new file mode 100644 index 0000000..c10c33f --- /dev/null +++ b/.checkpatch.conf @@ -0,0 +1,5 @@ +--no-tree +--ignore FILE_PATH_CHANGES +--exclude kernel_patches +--exclude patch +--exclude .github diff --git a/.github/workflows/checkpatch-pr.yml b/.github/workflows/checkpatch-pr.yml new file mode 100644 index 0000000..79ef8ad --- /dev/null +++ b/.github/workflows/checkpatch-pr.yml @@ -0,0 +1,17 @@ +name: checkpatch review +on: [pull_request] +jobs: + my_review: + name: checkpatch review + runs-on: ubuntu-latest + steps: + - name: 'Calculate PR commits + 1' + run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> $GITHUB_ENV + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: ${{ env.PR_FETCH_DEPTH }} + - name: Run checkpatch review + uses: webispy/checkpatch-action@v9 + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file