File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 2020 - packaging
2121 steps :
2222 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag=v5.0.0
23+ with :
24+ fetch-depth : 0 # needed for --new-from-rev
2325 - name : Calculate go version
2426 id : vars
2527 run : echo "go_version=$(make go-version)" >> $GITHUB_OUTPUT
3335 version : v2.1.0
3436 working-directory : ${{matrix.working-directory}}
3537 - name : Lint API
36- run : make lint-api
38+ run : GOLANGCI_LINT_API_EXTRA_ARGS=--new-from-rev=${{ github.event.pull_request.base.sha }} make lint-api
Original file line number Diff line number Diff line change @@ -94,4 +94,3 @@ linters:
9494issues :
9595 max-same-issues : 0
9696 max-issues-per-linter : 0
97- new-from-merge-base : main
Original file line number Diff line number Diff line change @@ -480,9 +480,11 @@ lint: $(GOLANGCI_LINT) $(GOLANGCI_LINT_KAL) ## Lint the codebase
480480lint-fix : $(GOLANGCI_LINT ) # # Lint the codebase and run auto-fixers if supported by the linter
481481 GOLANGCI_LINT_EXTRA_ARGS=--fix $(MAKE ) lint
482482
483+ GOLANGCI_LINT_API_EXTRA_ARGS ?= "--new-from-merge-base=main"
484+
483485.PHONY : lint-api
484486lint-api : $(GOLANGCI_LINT_KAL )
485- $(GOLANGCI_LINT_KAL ) run -v --config $(ROOT_DIR ) /.golangci-kal.yml $(GOLANGCI_LINT_EXTRA_ARGS )
487+ $(GOLANGCI_LINT_KAL ) run -v --config $(ROOT_DIR ) /.golangci-kal.yml $(GOLANGCI_LINT_EXTRA_ARGS ) $( GOLANGCI_LINT_API_EXTRA_ARGS )
486488
487489.PHONY : lint-api-fix
488490lint-api-fix : $(GOLANGCI_LINT_KAL )
You can’t perform that action at this time.
0 commit comments