Skip to content

Commit

Permalink
fixing lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tanyaveksler committed Dec 23, 2024
1 parent faa7ad7 commit 181b9ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions pkg/netpol/connlist/connlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,12 @@ func (ca *ConnlistAnalyzer) hasFatalError() error {
// getPolicyEngine returns a new policy engine considering the exposure analysis option
func (ca *ConnlistAnalyzer) getPolicyEngine(objectsList []parser.K8sObject) (*eval.PolicyEngine, error) {
if !ca.exposureAnalysis {
return eval.NewPolicyEngineWithOptionsList(eval.WithExplanation(ca.explain), eval.WithLogger(ca.logger), eval.WithObjectsList(objectsList))
return eval.NewPolicyEngineWithOptionsList(eval.WithExplanation(ca.explain),
eval.WithLogger(ca.logger), eval.WithObjectsList(objectsList))
}
// else build new policy engine with exposure analysis option
return eval.NewPolicyEngineWithOptionsList(eval.WithExposureAnalysis(), eval.WithExplanation(ca.explain), eval.WithLogger(ca.logger), eval.WithObjectsList(objectsList))
return eval.NewPolicyEngineWithOptionsList(eval.WithExposureAnalysis(), eval.WithExplanation(ca.explain),
eval.WithLogger(ca.logger), eval.WithObjectsList(objectsList))
}

func (ca *ConnlistAnalyzer) connsListFromParsedResources(objectsList []parser.K8sObject) ([]Peer2PeerConnection, []Peer, error) {
Expand Down
3 changes: 2 additions & 1 deletion pkg/netpol/eval/internal/k8s/netpol_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ package k8s
import (
"testing"

"github.com/np-guard/netpol-analyzer/pkg/netpol/internal/common"
v1 "k8s.io/api/core/v1"
netv1 "k8s.io/api/networking/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"

"github.com/np-guard/netpol-analyzer/pkg/netpol/internal/common"
)

/*func TestCreatePod(t *testing.T) {
Expand Down

0 comments on commit 181b9ac

Please sign in to comment.