Skip to content

Commit f8b3714

Browse files
committed
update golangci lint in gh actions
1 parent 77a862c commit f8b3714

File tree

7 files changed

+33
-8
lines changed

7 files changed

+33
-8
lines changed

.github/workflows/lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ jobs:
3333
- name: golangci-lint
3434
uses: golangci/golangci-lint-action@v6.1.1
3535
with:
36-
version: v1.48.0
36+
version: v1.60.0

cli/signature.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
func signature() *cobra.Command {
1414
cmd := &cobra.Command{
1515
Use: "signature",
16+
Short: "Commands for debugging and working with signatures.",
1617
Hidden: true, // Debugging tools
1718
Aliases: []string{"sig", "sigs", "signatures"},
1819
}

extensionsign/sigmanifest.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"github.com/coder/code-marketplace/storage/easyzip"
1414
)
1515

16+
// SignatureManifest should be serialized to JSON before being signed.
1617
type SignatureManifest struct {
1718
Package File
1819
// Entries is base64(filepath) -> File

extensionsign/sigmanifest_test.go

Lines changed: 0 additions & 7 deletions
This file was deleted.

storage/signature.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const (
2121
sigManifestName = ".signature.manifest"
2222
)
2323

24+
// Signature is a storage wrapper that can sign extensions on demand.
2425
type Signature struct {
2526
// Signer if provided, will be used to sign extensions. If not provided,
2627
// no extensions will be signed.

storage/signature_test.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package storage_test
2+
3+
import (
4+
"testing"
5+
6+
"github.com/coder/code-marketplace/extensionsign"
7+
"github.com/coder/code-marketplace/storage"
8+
)
9+
10+
func signed(factory func(t *testing.T) testStorage) func(t *testing.T) testStorage {
11+
return func(t *testing.T) testStorage {
12+
st := factory(t)
13+
key, _ := extensionsign.GenerateKey()
14+
15+
return testStorage{
16+
storage: storage.NewSignatureStorage(key, st.storage),
17+
write: st.write,
18+
exists: st.exists,
19+
}
20+
}
21+
}

storage/storage_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,14 @@ func TestStorage(t *testing.T) {
132132
name: "Artifactory",
133133
factory: artifactoryFactory,
134134
},
135+
//{
136+
// name: "SignedLocal",
137+
// factory: signed(localFactory),
138+
//},
139+
//{
140+
// name: "SignedArtifactory",
141+
// factory: signed(artifactoryFactory),
142+
//},
135143
}
136144
for _, sf := range factories {
137145
t.Run(sf.name, func(t *testing.T) {

0 commit comments

Comments
 (0)