Skip to content

Commit

Permalink
lint: ignore testhelper gosec
Browse files Browse the repository at this point in the history
  • Loading branch information
scorpioborn committed May 13, 2024
1 parent 19a8e5b commit 757155c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/e2e/house/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,8 @@ func (s *E2ETestSuite) TestWithdrawTxCmd() {
s.Require().NoError(err)

s.Require().NoError(clientCtx.Codec.UnmarshalJSON(bz.Bytes(), tc.respType), bz.String())
respType := tc.respType.(*sdk.TxResponse)
respType, ok := tc.respType.(*sdk.TxResponse)
s.Require().True(ok)
s.Require().Equal(tc.expectedCode, respType.Code)

txResp, err := clitestutil.GetTxResponse(s.network, clientCtx, respType.TxHash)
Expand Down
2 changes: 2 additions & 0 deletions testutil/simapp/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,12 @@ func RandomString(length int) string {
func WriteKeyringFile(name string, dir string, contents []byte) error {
file := filepath.Join(dir, name)

//#nosec
if err := os.MkdirAll(dir, 0o755); err != nil {
return fmt.Errorf("could not create directory %q: %w", dir, err)
}

//#nosec
if err := os.WriteFile(file, contents, 0o644); err != nil { //nolint: gosec

Check failure on line 126 in testutil/simapp/test_helpers.go

View workflow job for this annotation

GitHub Actions / Run golangci-lint

directive `//nolint: gosec` is unused for linter "gosec" (nolintlint)
return err
}
Expand Down

0 comments on commit 757155c

Please sign in to comment.