Preparing report...

Report for github.com/go-fed/httpsig

A    Great!    Found 6 issues across 8 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo62%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

    • httpsig/algorithms_test.go
    • Line 563: warning: cyclomatic complexity 18 of function TestSignerSigns() is high (> 15) (gocyclo)
    • Line 784: warning: cyclomatic complexity 17 of function TestMACerSigns() is high (> 15) (gocyclo)

golint50%

Golint is a linter for Go source code.

    • httpsig/algorithms.go
    • Line 49: warning: don't use underscores in Go names; const blake2s_256String should be blake2s256String (golint)
    • Line 50: warning: don't use underscores in Go names; const blake2b_256String should be blake2b256String (golint)
    • Line 51: warning: don't use underscores in Go names; const blake2b_384String should be blake2b384String (golint)
    • Line 52: warning: don't use underscores in Go names; const blake2b_512String should be blake2b512String (golint)
    • Line 290: warning: exported type ECDSASignature should have comment or be unexported (golint)
    • Line 332: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • httpsig/digest.go
    • Line 13: warning: exported type DigestAlgorithm should have comment or be unexported (golint)
    • Line 16: warning: exported const DigestSha256 should have comment (or a comment on this block) or be unexported (golint)
    • httpsig/httpsig.go
    • Line 1: warning: package comment should be of the form "Package httpsig ..." (golint)
    • Line 25: warning: comment on exported const HMAC_SHA224 should be of the form "HMAC_SHA224 ..." (golint)
    • Line 27: warning: exported const HMAC_SHA256 should have comment (or a comment on this block) or be unexported (golint)
    • Line 45: warning: comment on exported const RSA_SHA1 should be of the form "RSA_SHA1 ..." (golint)
    • Line 53: warning: comment on exported const ECDSA_SHA224 should be of the form "ECDSA_SHA224 ..." (golint)
    • Line 65: warning: don't use underscores in Go names; const rsa_SHA3_224 should be rsaSHA3_224 (golint)
    • Line 66: warning: don't use underscores in Go names; const rsa_SHA3_256 should be rsaSHA3_256 (golint)
    • Line 67: warning: don't use underscores in Go names; const rsa_SHA3_384 should be rsaSHA3_384 (golint)
    • Line 68: warning: don't use underscores in Go names; const rsa_SHA3_512 should be rsaSHA3_512 (golint)
    • Line 69: warning: don't use underscores in Go names; const rsa_SHA512_224 should be rsaSHA512_224 (golint)
    • Line 70: warning: don't use underscores in Go names; const rsa_SHA512_256 should be rsaSHA512_256 (golint)
    • Line 71: warning: don't use underscores in Go names; const rsa_BLAKE2S_256 should be rsaBLAKE2S256 (golint)
    • Line 72: warning: don't use underscores in Go names; const rsa_BLAKE2B_256 should be rsaBLAKE2B256 (golint)
    • Line 73: warning: don't use underscores in Go names; const rsa_BLAKE2B_384 should be rsaBLAKE2B384 (golint)
    • Line 74: warning: don't use underscores in Go names; const rsa_BLAKE2B_512 should be rsaBLAKE2B512 (golint)
    • Line 77: warning: comment on exported type SignatureScheme should be of the form "SignatureScheme ..." (with optional leading article) (golint)
    • Line 109: warning: comment on exported type Signer should be of the form "Signer ..." (with optional leading article) (golint)
    • Line 177: warning: comment on exported type SSHSigner should be of the form "SSHSigner ..." (with optional leading article) (golint)
    • Line 209: warning: comment on exported function NewSSHSigner should be of the form "NewSSHSigner ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign75%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!