Skip to content

Commit

Permalink
update local lint task to only lint changed files
Browse files Browse the repository at this point in the history
  • Loading branch information
ctreatma committed Feb 4, 2025
1 parent fc4011e commit f68b291
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
args: --whole-files # Remove along with only-new-issues by 2025
args: --whole-files
version: ${{ steps.golangcilint.outputs.version }}
only-new-issues: true # Remove along with pull-requests: read permission by 2025
only-new-issues: true
3 changes: 2 additions & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ PKG_NAME =equinix

GOLANGCI_LINT_VERSION=v1.60
GOLANGCI_LINT=go run github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION}
LINT_BASE_REF=origin/main

ifneq ($(origin TESTS_REGEXP), undefined)
TESTARGS = -run='$(TESTS_REGEXP)'
Expand Down Expand Up @@ -49,7 +50,7 @@ clean:
rm -f ${BINARY}

lint:
${GOLANGCI_LINT} run -v
${GOLANGCI_LINT} run -v --new-from-rev=${LINT_BASE_REF} --whole-files

vet:
@echo "go vet ."
Expand Down

0 comments on commit f68b291

Please sign in to comment.