Skip to content

Commit

Permalink
Try to make the linter happy
Browse files Browse the repository at this point in the history
Signed-off-by: Ethan Lowman <[email protected]>
  • Loading branch information
ethan-lowman-dd committed Aug 24, 2022
1 parent 88b6bc1 commit ca0eb4e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 0 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,5 @@ linters:
- gofmt
- govet
- gosimple
- structcheck
- varcheck
- unused
- typecheck
1 change: 1 addition & 0 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,7 @@ func (c *Client) downloadMetaFromTimestamp(name string, m data.TimestampFileMeta
}

// decodeRoot decodes and verifies root metadata.
//lint:ignore U1000 unused
func (c *Client) decodeRoot(b json.RawMessage) error {
root := &data.Root{}
if err := c.db.Unmarshal(b, root, "root", c.rootVer); err != nil {
Expand Down
7 changes: 5 additions & 2 deletions repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2684,7 +2684,7 @@ func (rs *RepoSuite) TestTargetMetadataLength(c *C) {
}
s := &data.Signed{}
c.Assert(json.Unmarshal(targetsJSON, s), IsNil)
fmt.Fprintf(os.Stderr, string(s.Signed))
fmt.Fprint(os.Stderr, s.Signed)
var objMap map[string]json.RawMessage
c.Assert(json.Unmarshal(s.Signed, &objMap), IsNil)
targetsMap, ok := objMap["targets"]
Expand All @@ -2697,8 +2697,11 @@ func (rs *RepoSuite) TestTargetMetadataLength(c *C) {
c.Fatal("missing foo.txt in targets")
}
c.Assert(json.Unmarshal(targetsMap, &objMap), IsNil)
targetsMap, ok = objMap["length"]
lengthMsg, ok := objMap["length"]
if !ok {
c.Fatal("missing length field in foo.txt file meta")
}
var length int64
c.Assert(json.Unmarshal(lengthMsg, &length), IsNil)
c.Assert(length, Equals, int64(0))
}
1 change: 0 additions & 1 deletion verify/db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ func TestDelegationsDB(t *testing.T) {
// Previously, every key's key ID was the SHA256 of the public key. TAP-12
// allows arbitrary key IDs, with no loss in security.
//
//
// TAP-12: https://github.com/theupdateframework/taps/blob/master/tap12.md
func TestTAP12(t *testing.T) {
db := NewDB()
Expand Down

0 comments on commit ca0eb4e

Please sign in to comment.