build: fix linting issues introduced by latest revive release

This commit is contained in:
Vincent Bernat
2022-08-07 23:54:24 +02:00
parent 50614cef5b
commit 61c8143fe8
12 changed files with 16 additions and 1 deletions

View File

@@ -148,7 +148,7 @@ test-coverage: | $(GOCOV) $(GOCOVXML) $(GOTESTSUM) ; $(info $(M) running coverag
.PHONY: lint .PHONY: lint
lint: .lint-go~ .lint-js~ ## Run linting lint: .lint-go~ .lint-js~ ## Run linting
.lint-go~: $(shell $(LSFILES) '*.go' 2> /dev/null) | $(REVIVE) ; $(info $(M) running golint) .lint-go~: $(shell $(LSFILES) '*.go' 2> /dev/null) | $(REVIVE) ; $(info $(M) running golint)
$Q $(REVIVE) -formatter friendly -set_exit_status $? $Q $(REVIVE) -formatter friendly -set_exit_status ./...
$Q touch $@ $Q touch $@
.lint-js~: $(shell $(LSFILES) '*.js' '*.vue' '*.html' 2> /dev/null) .lint-js~: $(shell $(LSFILES) '*.js' '*.vue' '*.html' 2> /dev/null)
.lint-js~: console/frontend/node_modules ; $(info $(M) running jslint) .lint-js~: console/frontend/node_modules ; $(info $(M) running jslint)

View File

@@ -1,6 +1,7 @@
// SPDX-FileCopyrightText: 2022 Free Mobile // SPDX-FileCopyrightText: 2022 Free Mobile
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
// Package mocks contains mocks for clickhousedb package.
package mocks package mocks
// This is empty to ensure the package exists to help Dependabot. // This is empty to ensure the package exists to help Dependabot.

View File

@@ -160,6 +160,7 @@ func SubnetMapUnmarshallerHook[V any]() mapstructure.DecodeHookFunc {
} }
} }
// MarshalYAML turns a subnet into a map that can be marshaled.
func (sm SubnetMap[V]) MarshalYAML() (interface{}, error) { func (sm SubnetMap[V]) MarshalYAML() (interface{}, error) {
return sm.ToMap(), nil return sm.ToMap(), nil
} }

View File

@@ -3,6 +3,8 @@
//go:build !release //go:build !release
// Package helpers contains small functions usable by any other
// package, both for testing or not.
package helpers package helpers
import ( import (

View File

@@ -1,6 +1,8 @@
// SPDX-FileCopyrightText: 2022 Free Mobile // SPDX-FileCopyrightText: 2022 Free Mobile
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
// Package kafka exposes some common helpers for Kafka, including the
// configuration struture.
package kafka package kafka
import "github.com/Shopify/sarama" import "github.com/Shopify/sarama"

View File

@@ -1,6 +1,7 @@
// SPDX-FileCopyrightText: 2022 Free Mobile // SPDX-FileCopyrightText: 2022 Free Mobile
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
// Package mocks contains mocks for conntrackfixer package.
package mocks package mocks
// This is empty to ensure the package exists to help Dependabot. // This is empty to ensure the package exists to help Dependabot.

View File

@@ -1,6 +1,7 @@
// SPDX-FileCopyrightText: 2022 Free Mobile // SPDX-FileCopyrightText: 2022 Free Mobile
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
// Package authentication handles user authentication for the console.
package authentication package authentication
import "akvorado/common/reporter" import "akvorado/common/reporter"

View File

@@ -1,6 +1,8 @@
// SPDX-FileCopyrightText: 2022 Free Mobile // SPDX-FileCopyrightText: 2022 Free Mobile
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
// Package database handles connection to a persistent database to
// save console settings.
package database package database
import ( import (

View File

@@ -1,6 +1,7 @@
// SPDX-FileCopyrightText: 2022 Free Mobile // SPDX-FileCopyrightText: 2022 Free Mobile
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
// Package filter parses and transforms a user filter.
package filter package filter
import ( import (

View File

@@ -1,6 +1,8 @@
// SPDX-FileCopyrightText: 2022 Free Mobile // SPDX-FileCopyrightText: 2022 Free Mobile
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
// Package decoder handles the protocol-independent part of flow
// decoding.
package decoder package decoder
import ( import (

View File

@@ -1,6 +1,7 @@
// SPDX-FileCopyrightText: 2022 Free Mobile // SPDX-FileCopyrightText: 2022 Free Mobile
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
// Package input defines the interface of an input module for inlet.
package input package input
import ( import (

View File

@@ -1,6 +1,7 @@
// SPDX-FileCopyrightText: 2022 Free Mobile // SPDX-FileCopyrightText: 2022 Free Mobile
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
// Package kafka handles Kafka-related configuration for the orchestrator.
package kafka package kafka
import ( import (