ignore semgrep file

This commit is contained in:
0xmuralik 2023-03-14 12:46:27 +05:30
parent c7de0ed8eb
commit 80d15ffd1f
3 changed files with 6 additions and 10 deletions

View File

@ -88,6 +88,4 @@ jobs:
run: |
nix run -f ./nix gomod2nix
git diff --no-ext-diff --exit-code
with:
github-token: ${{ secrets.github_token }}
if: env.GIT_DIFF

View File

@ -19,6 +19,9 @@ test/
tests/
*_test.go
# false positive
testutil/network/network.go
# Semgrep rules folder
.semgrep

View File

@ -228,11 +228,7 @@ func NewCLILogger(cmd *cobra.Command) CLILogger {
}
// New creates a new Network for integration tests or in-process testnets run via the CLI
// nosemgrep
func New(l Logger, baseDir string, cfg Config) (*Network, error) { //nosemgrep
// nosemgrep
// ignore semgrep: Missing mutex unlock before returning from a function.
// unlocking in cleanup func
func New(l Logger, baseDir string, cfg Config) (*Network, error) {
// only one caller/test can create and use a network at a time
l.Log("acquiring test network lock")
lock.Lock()
@ -333,9 +329,8 @@ func New(l Logger, baseDir string, cfg Config) (*Network, error) { //nosemgrep
appCfg.JSONRPC.Address = cfg.JSONRPCAddress
} else {
_, jsonRPCPort, err := server.FreeTCPAddr()
if err != nil { // nosemgrep
// nosemgrep
return nil, err // nosemgrep
if err != nil {
return nil, err
}
appCfg.JSONRPC.Address = fmt.Sprintf("127.0.0.1:%s", jsonRPCPort)
}