ignore semgrep file
This commit is contained in:
parent
c7de0ed8eb
commit
80d15ffd1f
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
@ -88,6 +88,4 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
nix run -f ./nix gomod2nix
|
nix run -f ./nix gomod2nix
|
||||||
git diff --no-ext-diff --exit-code
|
git diff --no-ext-diff --exit-code
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.github_token }}
|
|
||||||
if: env.GIT_DIFF
|
if: env.GIT_DIFF
|
||||||
|
@ -19,6 +19,9 @@ test/
|
|||||||
tests/
|
tests/
|
||||||
*_test.go
|
*_test.go
|
||||||
|
|
||||||
|
# false positive
|
||||||
|
testutil/network/network.go
|
||||||
|
|
||||||
# Semgrep rules folder
|
# Semgrep rules folder
|
||||||
.semgrep
|
.semgrep
|
||||||
|
|
||||||
|
@ -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
|
// 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) {
|
||||||
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
|
|
||||||
// only one caller/test can create and use a network at a time
|
// only one caller/test can create and use a network at a time
|
||||||
l.Log("acquiring test network lock")
|
l.Log("acquiring test network lock")
|
||||||
lock.Lock()
|
lock.Lock()
|
||||||
@ -333,9 +329,8 @@ func New(l Logger, baseDir string, cfg Config) (*Network, error) { //nosemgrep
|
|||||||
appCfg.JSONRPC.Address = cfg.JSONRPCAddress
|
appCfg.JSONRPC.Address = cfg.JSONRPCAddress
|
||||||
} else {
|
} else {
|
||||||
_, jsonRPCPort, err := server.FreeTCPAddr()
|
_, jsonRPCPort, err := server.FreeTCPAddr()
|
||||||
if err != nil { // nosemgrep
|
if err != nil {
|
||||||
// nosemgrep
|
return nil, err
|
||||||
return nil, err // nosemgrep
|
|
||||||
}
|
}
|
||||||
appCfg.JSONRPC.Address = fmt.Sprintf("127.0.0.1:%s", jsonRPCPort)
|
appCfg.JSONRPC.Address = fmt.Sprintf("127.0.0.1:%s", jsonRPCPort)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user