From 81d51251390ea686771bd110a65545c43a9bd4bc Mon Sep 17 00:00:00 2001
From: Andre Sterba <andre.sterba@stud.h-da.de>
Date: Mon, 28 Mar 2022 13:46:58 +0000
Subject: [PATCH] Remove jq that will capture the exit code of golangci-lint

See merge request danet/gosdn!268
---
 Makefile                                         | 2 +-
 controller/api/grpc.go                           | 2 ++
 controller/config/config.go                      | 1 -
 controller/northbound/server/auth_interceptor.go | 2 ++
 4 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 8b7569837..13e08b2ca 100644
--- a/Makefile
+++ b/Makefile
@@ -26,7 +26,7 @@ ci-install-tools:
 	go install gotest.tools/gotestsum@v1.7.0
 
 ci-lint: ci-install-tools
-	golangci-lint run --config .golangci.yml --out-format code-climate | jq -r '.[] | "\(.location.path):\(.location.lines.begin) \(.description)"'
+	golangci-lint run --config .golangci.yml --out-format code-climate
 
 lint: install-tools
 	./$(TOOLS_DIR)/golangci-lint run --config .golangci.yml | jq
diff --git a/controller/api/grpc.go b/controller/api/grpc.go
index 0ec442391..71f08e6de 100644
--- a/controller/api/grpc.go
+++ b/controller/api/grpc.go
@@ -404,6 +404,7 @@ func SendChangeRequest(addr, pid string, req *ppb.ChangeRequest) (*ppb.SetPathLi
 	return pndClient.SetPathList(ctx, r)
 }
 
+// Login logs a user in
 func Login(addr, username, pwd string) (*apb.LoginResponse, error) {
 	authClient, err := nbi.AuthClient(addr, dialOptions...)
 	if err != nil {
@@ -418,6 +419,7 @@ func Login(addr, username, pwd string) (*apb.LoginResponse, error) {
 	return authClient.Login(ctx, r)
 }
 
+// Logout logs a user out
 func Logout(addr, username string) (*apb.LogoutResponse, error) {
 	authClient, err := nbi.AuthClient(addr, dialOptions...)
 	if err != nil {
diff --git a/controller/config/config.go b/controller/config/config.go
index dab434d61..294ff53b5 100644
--- a/controller/config/config.go
+++ b/controller/config/config.go
@@ -39,7 +39,6 @@ func Init() {
 	if err != nil {
 		log.Error("failed initialization of module import", err)
 	}
-
 }
 
 // InitializeConfig loads the configuration
diff --git a/controller/northbound/server/auth_interceptor.go b/controller/northbound/server/auth_interceptor.go
index c65672785..83ede44f5 100644
--- a/controller/northbound/server/auth_interceptor.go
+++ b/controller/northbound/server/auth_interceptor.go
@@ -7,9 +7,11 @@ import (
 	"google.golang.org/grpc"
 )
 
+// AuthInterceptor provides an AuthInterceptor
 type AuthInterceptor struct {
 }
 
+// Unary provides middleware functionality
 func (auth AuthInterceptor) Unary() grpc.UnaryServerInterceptor {
 	return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
 		log.Info("Interceptor called")
-- 
GitLab