Skip to content

Commit 43d3225

Browse files
authored
Add a lint job (#3)
1 parent 6dbd62a commit 43d3225

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,16 @@ on:
1111
jobs:
1212
test:
1313
runs-on: ubuntu-latest
14-
1514
steps:
1615
- uses: actions/checkout@v4
1716
- uses: actions/setup-go@v5
1817
- run: go test -coverpkg ./... -coverprofile coverage.txt ./...
1918
- uses: codecov/codecov-action@v5
19+
lint:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: actions/setup-go@v5
24+
- uses: golangci/golangci-lint-action@v6
25+
with:
26+
version: v1.60

internal/collect.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func Assign(tests []testf, index int, total int, seed int64) (names, paths []str
9292

9393
names = slices.CompactFunc(names, func(l, r string) bool {
9494
if l == r {
95-
fmt.Fprintln(os.Stderr, fmt.Sprintf("warning: %q exists in multiple packages, consider renaming it", l))
95+
fmt.Fprintf(os.Stderr, "warning: %q exists in multiple packages, consider renaming it\n", l)
9696
}
9797
return l == r
9898
})

main.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ import (
1212
"github.com/pulumi/shard/internal"
1313
)
1414

15-
type testf struct {
16-
path string
17-
name string
18-
}
19-
2015
func main() {
2116
log.SetFlags(0)
2217
log.SetPrefix(filepath.Base(os.Args[0]) + ": ")

0 commit comments

Comments
 (0)