Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
sum.golang.org:443
uploads.github.com:443
objects.githubusercontent.com:443
release-assets.githubusercontent.com:443

- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with:
version: v2.1
version: v2.3
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ linters:
- usetesting
- wastedassign
- whitespace
- wsl
- wsl_v5
- zerologlint
# - cyclop
# - depguard
Expand Down
1 change: 1 addition & 0 deletions cmd/krel/cmd/sign_blobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ func runSignBlobs(signOpts *signOptions, signBlobOpts *signBlobOptions, args []s
}

var tempDir string

defer func() {
if tempDir != "" {
os.RemoveAll(tempDir)
Expand Down
2 changes: 2 additions & 0 deletions cmd/publish-release/cmd/github_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ func TestProcessRemoteAsset(t *testing.T) {

prev := os.Getenv(gacVar)
defer t.Setenv(gacVar, prev)

t.Setenv(gacVar, "")

files := []string{}

defer func() {
for _, f := range files {
os.RemoveAll(f)
Expand Down
2 changes: 1 addition & 1 deletion dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ dependencies:

# golangci-lint-version
- name: "golangci-lint"
version: v2.1
version: v2.3
refPaths:
- path: .github/workflows/lint.yml
match: "version: v\\d+.\\d+?\\.?(\\d+)?"
Expand Down
1 change: 1 addition & 0 deletions pkg/binary/binary_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
func TestContainsString(t *testing.T) {
tmpfile, err := os.CreateTemp(t.TempDir(), "")
require.NoError(t, err)

defer os.Remove(tmpfile.Name())

// Decode a fragment of kubectl into a temporary file:
Expand Down
2 changes: 2 additions & 0 deletions pkg/gcp/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ func RunSingleJob(o *Options, jobName, uploaded, version string, subs map[string
}

defer f.Close()

cmd.AddWriter(f)
}

Expand Down Expand Up @@ -362,6 +363,7 @@ func RunBuildJobs(o *Options) []error {
for k, v := range vs {
go func(job string, vc map[string]string) {
defer w.Done()

logrus.Infof("Starting job %q...", job)

if err := RunSingleJob(o, job, uploaded, tag, mergeMaps(extraSubs, vc)); err != nil {
Expand Down
1 change: 1 addition & 0 deletions pkg/notes/document/document_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ func setupTestDir(t *testing.T, dir string) {

func repoTagTarball(t *testing.T, path, repoTag string) {
const manifestJSON = "manifest.json"

manifestJSONPath := filepath.Join(filepath.Dir(path), manifestJSON)
require.NoError(t, os.WriteFile(
manifestJSONPath,
Expand Down
2 changes: 2 additions & 0 deletions pkg/notes/notes.go
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,7 @@ type commitList struct {
func (l *commitList) Add(c []*gogithub.RepositoryCommit) {
l.Lock()
defer l.Unlock()

l.list = append(l.list, c...)
}

Expand Down Expand Up @@ -917,6 +918,7 @@ type resultList struct {
func (l *resultList) Add(r *Result) {
l.Lock()
defer l.Unlock()

l.list = append(l.list, r)
}

Expand Down
1 change: 1 addition & 0 deletions pkg/release/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ func (p *Publisher) PublishReleaseNotesIndex(
}

defer os.RemoveAll(tempDir)

tempIndexFile := filepath.Join(tempDir, releaseNotesIndex)

if err := p.client.CopyToLocal(
Expand Down
2 changes: 2 additions & 0 deletions pkg/testgrid/testgrid-scraper.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func ReqTestgridDashboardSummaries(ctx context.Context, dashboardNames []Dashboa
// Worker
requestData := func(done <-chan interface{}, dashboardNames ...DashboardName) <-chan SummaryLookup {
summaryLookups := make(chan SummaryLookup)

go func() {
defer close(summaryLookups)

Expand Down Expand Up @@ -163,6 +164,7 @@ func (d *JobData) Overview() (Overview, error) {
// UnmarshalTestgridSummary used to unmarshal bytes into TestgridSummary.
func UnmarshalTestgridSummary(data []byte) (JobData, error) {
var r JobData

err := json.Unmarshal(data, &r)

return r, err
Expand Down