Skip to content

Commit

Permalink
fix linter and pipeline (#3)
Browse files Browse the repository at this point in the history
Signed-off-by: Sarah Funkhouser <[email protected]>
  • Loading branch information
golanglemonade authored Aug 27, 2024
1 parent 0952d56 commit d069f06
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
10 changes: 5 additions & 5 deletions .buildkite/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ steps:
command: ["go", "test", "-coverprofile=coverage.out", "./..."]
artifact_paths: ["coverage.out"]
- group: ":closed_lock_with_key: Security Checks"
depends_on: "go_test_libsql"
depends_on: "go_test"
key: "security"
steps:
- label: ":closed_lock_with_key: gosec"
Expand All @@ -43,13 +43,13 @@ steps:
- label: ":github: upload PR reports"
key: "scan-upload-pr"
if: build.pull_request.id != null
depends_on: ["gosec", "go_test_libsql"]
depends_on: ["gosec", "go_test"]
plugins:
- artifacts#v1.9.4:
download: "results.txt"
- artifacts#v1.9.4:
download: "coverage.out"
step: "go_test_libsql"
step: "go_test"
- docker#v5.11.0:
image: "sonarsource/sonar-scanner-cli:5"
environment:
Expand All @@ -59,13 +59,13 @@ steps:
- label: ":github: upload reports"
key: "scan-upload"
if: build.branch == "main"
depends_on: ["gosec", "go_test_libsql"]
depends_on: ["gosec", "go_test"]
plugins:
- artifacts#v1.9.4:
download: results.txt
- artifacts#v1.9.4:
download: coverage.out
step: "go_test_libsql"
step: "go_test"
- docker#v5.11.0:
image: "sonarsource/sonar-scanner-cli:5"
environment:
Expand Down
2 changes: 1 addition & 1 deletion slack/slack.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (c *Client) Post(ctx context.Context, payload *Payload) error {
return err
}

return fmt.Errorf("slack: %s failed with %d %s", payloadJSON, resp.StatusCode, string(body))
return fmt.Errorf("slack: %s failed with %d %s", payloadJSON, resp.StatusCode, string(body)) //nolint:err113
}

return nil
Expand Down
3 changes: 3 additions & 0 deletions ulids/ulids_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ func TestNew(t *testing.T) {
require.False(t, ulidlib.IsZero(uid))
}()
}

wg.Wait()
}

Expand All @@ -64,6 +65,7 @@ func TestFromTime(t *testing.T) {
vals.Store(uid, struct{}{})
}()
}

wg.Wait()

nunique := 0
Expand All @@ -72,6 +74,7 @@ func TestFromTime(t *testing.T) {
nunique++
return true
})

require.Equal(t, 100, nunique)
}

Expand Down

0 comments on commit d069f06

Please sign in to comment.