Skip to content

Commit

Permalink
Lint only changed files in the PR
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham1g5 committed Dec 4, 2024
1 parent bbb7a96 commit 1c47669
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ jobs:
with:
fetch-depth: 0

- name: Get changed files
id: files
uses: octokit/request-action@v2
with:
route: GET /repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Lint Code Base
uses: super-linter/super-linter@v5
env:
Expand All @@ -29,3 +37,5 @@ jobs:
IGNORE_GITIGNORED_FILES: true
VALIDATE_JSCPD: false
JAVA_FILE_NAME: checkstyle.xml
with:
changed_files: ${{ steps.files.outputs.files }}

0 comments on commit 1c47669

Please sign in to comment.