Skip to content

Commit

Permalink
fix(authz): check string is not empty (#18209)
Browse files Browse the repository at this point in the history
(cherry picked from commit 19eaac3)

# Conflicts:
#	x/authz/generic_authorization.go
  • Loading branch information
tac0turtle authored and mergify[bot] committed Oct 23, 2023
1 parent d003fa1 commit f8665d9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions x/authz/generic_authorization.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
package authz

import (
<<<<<<< HEAD

Check failure on line 4 in x/authz/generic_authorization.go

View workflow job for this annotation

GitHub Actions / golangci-lint

expected 'STRING', found '<<' (typecheck)

Check failure on line 4 in x/authz/generic_authorization.go

View workflow job for this annotation

GitHub Actions / split-test-files

expected 'STRING', found '<<'
=======
"context"
"errors"

>>>>>>> 19eaac3ba (fix(authz): check string is not empty (#18209))

Check failure on line 9 in x/authz/generic_authorization.go

View workflow job for this annotation

GitHub Actions / golangci-lint

exponent has no digits (typecheck)
sdk "github.com/cosmos/cosmos-sdk/types"
)

Expand All @@ -25,5 +31,8 @@ func (a GenericAuthorization) Accept(ctx sdk.Context, msg sdk.Msg) (AcceptRespon

// ValidateBasic implements Authorization.ValidateBasic.
func (a GenericAuthorization) ValidateBasic() error {
if a.Msg == "" {

Check failure on line 34 in x/authz/generic_authorization.go

View workflow job for this annotation

GitHub Actions / golangci-lint

expected 'STRING', found 'if' (typecheck)
return errors.New("msg type cannot be empty")

Check failure on line 35 in x/authz/generic_authorization.go

View workflow job for this annotation

GitHub Actions / golangci-lint

expected 'STRING', found 'return' (typecheck)
}
return nil

Check failure on line 37 in x/authz/generic_authorization.go

View workflow job for this annotation

GitHub Actions / golangci-lint

expected 'STRING', found 'return' (typecheck)
}

Check failure on line 38 in x/authz/generic_authorization.go

View workflow job for this annotation

GitHub Actions / golangci-lint

expected ')', found 'EOF' (typecheck)

0 comments on commit f8665d9

Please sign in to comment.