Skip to content

Commit

Permalink
finished lint error fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jn9e9 committed Jan 21, 2021
1 parent e57038d commit 390e9cf
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
12 changes: 6 additions & 6 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
linters-settings:
depguard:
list-type: blacklist
packages:
# logging is allowed only by logutils.Log, logrus
# is allowed to use only in logutils package
- github.com/sirupsen/logrus
packages-with-error-message:
- github.com/sirupsen/logrus: "logging is allowed only by logutils.Log"
# packages:
# # logging is allowed only by logutils.Log, logrus
# # is allowed to use only in logutils package
# - github.com/sirupsen/logrus
# packages-with-error-message:
# - github.com/sirupsen/logrus: "logging is allowed only by logutils.Log"
dupl:
threshold: 100
funlen:
Expand Down
2 changes: 1 addition & 1 deletion algorithm/cipher.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func NewCipher(mode CipherModeType) *Algorithm {
}
}

func newCipherFromWire(a psaalgorithm.Algorithm_Cipher) (*Cipher, error) {
func newCipherFromWire(a psaalgorithm.Algorithm_Cipher) (*Cipher, error) { //nolint:unparam
return &Cipher{
Mode: CipherModeType(a),
}, nil
Expand Down
1 change: 1 addition & 0 deletions algorithm/hash.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const (
HashAlgorithmTypeSHA3_512 HashAlgorithmType = 15
)

//nolint:gocyclo
func (a HashAlgorithmType) String() string {
switch a {
case HashAlgorithmTypeNONE:
Expand Down
2 changes: 1 addition & 1 deletion basicclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (c *BasicClient) SetAuthType(authType auth.AuthenticationType) {
}

// Ping server and return wire protocol major and minor version number
func (c BasicClient) Ping() (uint8, uint8, error) {
func (c BasicClient) Ping() (uint8, uint8, error) { //nolint:gocritic
return c.opclient.Ping()
}

Expand Down
2 changes: 1 addition & 1 deletion keyinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ type KeyAttributes struct {
KeyPolicy *KeyPolicy
}

func newKeyAttributesFromOp(ka *psakeyattributes.KeyAttributes) (*KeyAttributes, error) {
func newKeyAttributesFromOp(ka *psakeyattributes.KeyAttributes) (*KeyAttributes, error) { //nolint:unparam
return &KeyAttributes{
KeyBits: ka.KeyBits,
// KeyPolicy: ,
Expand Down
2 changes: 1 addition & 1 deletion wireinterface/operations/operations_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (c Client) Version() string {
}

// Ping server and return wire protocol major and minor version number
func (c Client) Ping() (uint8, uint8, error) {
func (c Client) Ping() (uint8, uint8, error) { //nolint:gocritic
req := &ping.Operation{}
resp := &ping.Result{}
err := c.operation(requests.OpPing, requests.ProviderCore, req, resp)
Expand Down
1 change: 1 addition & 0 deletions wireinterface/requests/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ func NewResponse(buf *bytes.Buffer, pb proto.Message) (*Response, error) {
}

// ResponseCodeToErr returns nil if the response code is a success, or an appropriate error otherwise.
//nolint:gocyclo
func ResponseCodeToErr(code uint16) error {
switch code {
case RespSuccess:
Expand Down

0 comments on commit 390e9cf

Please sign in to comment.