Skip to content

Commit d9787b3

Browse files
feat(lint): add linelint
1 parent 61d1ced commit d9787b3

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/__call-common-lint.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@ jobs:
2525
steps:
2626
- name: Checkout
2727
uses: actions/checkout@v5
28+
with:
29+
fetch-depth: 2 # need to fetch 2 to get list of changed files
30+
31+
- name: Get changed files
32+
id: changed_files
33+
run: |
34+
firstCommit='${{ github.event.pull_request.base.sha }}'
35+
lastCommit='${{ github.event.pull_request.head.sha }}'
36+
changedFiles=$(git diff --name-only --diff-filter=d "${firstCommit}" "${lastCommit}")
37+
echo "Changed files: ${changedFiles}"
38+
echo "CHANGED_FILES=${changedFiles}" >> "${GITHUB_OUTPUT}"
2839
2940
- name: Download problem matchers
3041
shell: bash
@@ -286,6 +297,12 @@ jobs:
286297
287298
exit ${error}
288299
300+
- name: linelint
301+
if: always()
302+
run: |
303+
go get github.com/fernandrone/linelint
304+
linelint ${{ steps.changed_files.outputs.CHANGED_FILES }}
305+
289306
- name: PowerShell - PSScriptAnalyzer
290307
if: always()
291308
shell: pwsh

0 commit comments

Comments
 (0)