Skip to content

Commit 65a5729

Browse files
committed
focus linter only on new changes when run from PRs
1 parent f83161c commit 65a5729

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/lint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ jobs:
2424
go-version-file: go.mod
2525
- name: golangci-lint
2626
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
27+
with:
28+
only-new-issues: ${{ github.event_name == 'pull_request' }}

internal/controller/controller.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"errors"
66
"fmt"
77
"log/slog"
8+
"slices"
89
"strings"
910
"sync"
1011
"time"
@@ -353,6 +354,7 @@ func (c *Controller) processEvent(ctx context.Context, event PodEvent) error {
353354
for risk := range aggMetadata.RuntimeRisks {
354355
runtimeRisks = append(runtimeRisks, risk)
355356
}
357+
slices.Sort(runtimeRisks)
356358
}
357359

358360
// Record info for each container in the pod

0 commit comments

Comments
 (0)