From 48a989fbf139e11c95d9228362e4927671d4d043 Mon Sep 17 00:00:00 2001 From: Vladislav Byrgazov Date: Tue, 12 Nov 2024 10:13:23 +0500 Subject: [PATCH] Fix goheader linter Signed-off-by: Vladislav Byrgazov --- .golangci.yml | 8 ++------ pkg/networkservice/chains/nsmgr/reselect_test.go | 2 +- .../common/mechanisms/recvfd/client_notlinux.go | 2 +- .../common/mechanisms/recvfd/server_notlinux.go | 2 +- .../common/mechanisms/sendfd/client_notlinux.go | 2 +- .../common/mechanisms/sendfd/server_notlinux.go | 2 +- pkg/networkservice/common/switchcase/client_test.go | 2 ++ pkg/networkservice/common/switchcase/common_test.go | 2 ++ pkg/networkservice/common/switchcase/server_test.go | 2 ++ pkg/registry/common/clientinfo/client_test.go | 2 +- pkg/registry/common/clientinfo/server_test.go | 2 +- pkg/registry/common/recvfd/client_nolinux.go | 4 ++-- pkg/registry/common/recvfd/server_notlinux.go | 2 +- pkg/registry/common/sendfd/client_nolinux.go | 4 ++-- pkg/registry/common/sendfd/server_nolinux.go | 2 ++ pkg/tools/clockmock/mock_test.go | 2 ++ pkg/tools/log/logruslogger/logruslogger.go | 2 +- 17 files changed, 25 insertions(+), 19 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 3cb7a9499..b4488a26d 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -11,7 +11,7 @@ linters-settings: values: regexp: company: .* - copyright-holder: Copyright \(c\) ({{year-range}}) {{company}}\n\n + copyright-holder: Copyright \(c\) ({{mod-year-range}}) {{company}}\n\n copyright-holders: ({{copyright-holder}})+ errcheck: check-type-assertions: false @@ -130,7 +130,7 @@ linters-settings: linters: disable-all: true enable: - # - goheader // Disabled since auto-fix is broken + - goheader - bodyclose - depguard - dogsled @@ -204,10 +204,6 @@ issues: linters: - dupl text: "lines are duplicate of" - - path: pkg/tools/spiffeutils/spiffeutils.go - linters: - - interfacer - text: "can be `fmt.Stringer`" - path: pkg/networkservice/core/trace/client.go linters: - dupl diff --git a/pkg/networkservice/chains/nsmgr/reselect_test.go b/pkg/networkservice/chains/nsmgr/reselect_test.go index bb8c1d5b7..1a5bac772 100644 --- a/pkg/networkservice/chains/nsmgr/reselect_test.go +++ b/pkg/networkservice/chains/nsmgr/reselect_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2023 Cisco and/or its affiliates. +// Copyright (c) 2023-2024 Cisco and/or its affiliates. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/networkservice/common/mechanisms/recvfd/client_notlinux.go b/pkg/networkservice/common/mechanisms/recvfd/client_notlinux.go index d9fb1033e..2c82d45e9 100644 --- a/pkg/networkservice/common/mechanisms/recvfd/client_notlinux.go +++ b/pkg/networkservice/common/mechanisms/recvfd/client_notlinux.go @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Cisco and/or its affiliates. +// Copyright (c) 2021-2024 Cisco and/or its affiliates. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/networkservice/common/mechanisms/recvfd/server_notlinux.go b/pkg/networkservice/common/mechanisms/recvfd/server_notlinux.go index 232f7a7bb..076d3bad8 100644 --- a/pkg/networkservice/common/mechanisms/recvfd/server_notlinux.go +++ b/pkg/networkservice/common/mechanisms/recvfd/server_notlinux.go @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Cisco and/or its affiliates. +// Copyright (c) 2021-2024 Cisco and/or its affiliates. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/networkservice/common/mechanisms/sendfd/client_notlinux.go b/pkg/networkservice/common/mechanisms/sendfd/client_notlinux.go index faa97750e..38b6bb691 100644 --- a/pkg/networkservice/common/mechanisms/sendfd/client_notlinux.go +++ b/pkg/networkservice/common/mechanisms/sendfd/client_notlinux.go @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Cisco and/or its affiliates. +// Copyright (c) 2021-2024 Cisco and/or its affiliates. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/networkservice/common/mechanisms/sendfd/server_notlinux.go b/pkg/networkservice/common/mechanisms/sendfd/server_notlinux.go index ff0be800c..849cbf596 100644 --- a/pkg/networkservice/common/mechanisms/sendfd/server_notlinux.go +++ b/pkg/networkservice/common/mechanisms/sendfd/server_notlinux.go @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Cisco and/or its affiliates. +// Copyright (c) 2021-2024 Cisco and/or its affiliates. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/networkservice/common/switchcase/client_test.go b/pkg/networkservice/common/switchcase/client_test.go index d65668c29..f3f64a0e4 100644 --- a/pkg/networkservice/common/switchcase/client_test.go +++ b/pkg/networkservice/common/switchcase/client_test.go @@ -1,5 +1,7 @@ // Copyright (c) 2021 Doc.ai and/or its affiliates. // +// Copyright (c) 2024 Cisco and/or its affiliates. +// // SPDX-License-Identifier: Apache-2.0 // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/pkg/networkservice/common/switchcase/common_test.go b/pkg/networkservice/common/switchcase/common_test.go index 6b831046a..c0f888349 100644 --- a/pkg/networkservice/common/switchcase/common_test.go +++ b/pkg/networkservice/common/switchcase/common_test.go @@ -1,5 +1,7 @@ // Copyright (c) 2021 Doc.ai and/or its affiliates. // +// Copyright (c) 2024 Cisco and/or its affiliates. +// // SPDX-License-Identifier: Apache-2.0 // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/pkg/networkservice/common/switchcase/server_test.go b/pkg/networkservice/common/switchcase/server_test.go index f16c28aa5..8b58294a5 100644 --- a/pkg/networkservice/common/switchcase/server_test.go +++ b/pkg/networkservice/common/switchcase/server_test.go @@ -1,5 +1,7 @@ // Copyright (c) 2021 Doc.ai and/or its affiliates. // +// Copyright (c) 2024 Cisco and/or its affiliates. +// // SPDX-License-Identifier: Apache-2.0 // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/pkg/registry/common/clientinfo/client_test.go b/pkg/registry/common/clientinfo/client_test.go index 5657aff85..e5b75ca25 100644 --- a/pkg/registry/common/clientinfo/client_test.go +++ b/pkg/registry/common/clientinfo/client_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2022 Cisco and/or its affiliates. +// Copyright (c) 2022-2024 Cisco and/or its affiliates. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/registry/common/clientinfo/server_test.go b/pkg/registry/common/clientinfo/server_test.go index 302bcc753..c6e257442 100644 --- a/pkg/registry/common/clientinfo/server_test.go +++ b/pkg/registry/common/clientinfo/server_test.go @@ -1,6 +1,6 @@ // Copyright (c) 2020-2021 Doc.ai and/or its affiliates. // -// Copyright (c) 2022 Cisco and/or its affiliates. +// Copyright (c) 2022-2024 Cisco and/or its affiliates. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/registry/common/recvfd/client_nolinux.go b/pkg/registry/common/recvfd/client_nolinux.go index ae0da1837..3b002fd3c 100644 --- a/pkg/registry/common/recvfd/client_nolinux.go +++ b/pkg/registry/common/recvfd/client_nolinux.go @@ -1,7 +1,7 @@ -// Copyright (c) 2021 Cisco and/or its affiliates. -// // Copyright (c) 2021 Doc.ai and/or its affiliates. // +// Copyright (c) 2021-2024 Cisco and/or its affiliates. +// // SPDX-License-Identifier: Apache-2.0 // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/pkg/registry/common/recvfd/server_notlinux.go b/pkg/registry/common/recvfd/server_notlinux.go index a74090b8a..06aa17517 100644 --- a/pkg/registry/common/recvfd/server_notlinux.go +++ b/pkg/registry/common/recvfd/server_notlinux.go @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Cisco and/or its affiliates. +// Copyright (c) 2021-2024 Cisco and/or its affiliates. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/registry/common/sendfd/client_nolinux.go b/pkg/registry/common/sendfd/client_nolinux.go index bc7d21fae..3f1d07eeb 100644 --- a/pkg/registry/common/sendfd/client_nolinux.go +++ b/pkg/registry/common/sendfd/client_nolinux.go @@ -1,7 +1,7 @@ -// Copyright (c) 2021 Cisco and/or its affiliates. -// // Copyright (c) 2021 Doc.ai and/or its affiliates. // +// Copyright (c) 2021-2024 Cisco and/or its affiliates. +// // SPDX-License-Identifier: Apache-2.0 // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/pkg/registry/common/sendfd/server_nolinux.go b/pkg/registry/common/sendfd/server_nolinux.go index 403e81ad0..0c2a19f52 100644 --- a/pkg/registry/common/sendfd/server_nolinux.go +++ b/pkg/registry/common/sendfd/server_nolinux.go @@ -1,5 +1,7 @@ // Copyright (c) 2020-2021 Doc.ai and/or its affiliates. // +// Copyright (c) 2024 Cisco and/or its affiliates. +// // SPDX-License-Identifier: Apache-2.0 // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/pkg/tools/clockmock/mock_test.go b/pkg/tools/clockmock/mock_test.go index a495d3405..f148e2659 100644 --- a/pkg/tools/clockmock/mock_test.go +++ b/pkg/tools/clockmock/mock_test.go @@ -1,5 +1,7 @@ // Copyright (c) 2021 Doc.ai and/or its affiliates. // +// Copyright (c) 2024 Cisco and/or its affiliates. +// // SPDX-License-Identifier: Apache-2.0 // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/pkg/tools/log/logruslogger/logruslogger.go b/pkg/tools/log/logruslogger/logruslogger.go index 422e66177..41d9b3bc2 100644 --- a/pkg/tools/log/logruslogger/logruslogger.go +++ b/pkg/tools/log/logruslogger/logruslogger.go @@ -1,6 +1,6 @@ // Copyright (c) 2021-2022 Doc.ai and/or its affiliates. // -// Copyright (c) 2023 Cisco and/or its affiliates. +// Copyright (c) 2023-2024 Cisco and/or its affiliates. // // SPDX-License-Identifier: Apache-2.0 //