diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a9760fbf..1116aca6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -42,11 +42,12 @@ jobs: steps: - name: Check out code into the Go module directory uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: golangci-lint uses: golangci/golangci-lint-action@v2 with: version: v1.37.1 - only-new-issues: true excludeFmtErrorf: name: exclude fmt.Errorf runs-on: ubuntu-latest diff --git a/.golangci.yml b/.golangci.yml index c0e5a96a..b26cb548 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -34,6 +34,8 @@ linters-settings: suggest-new: true dupl: threshold: 150 + funlen: + lines: 70 goconst: min-len: 2 min-occurrences: 2 @@ -168,7 +170,7 @@ issues: - path: pkg/networkservice/mechanisms/kernel/kernelvethpair/common.go linters: - funlen - text: "Function 'create'" + - gocyclo - path: pkg/networkservice/mechanisms/kernel/kerneltap/common.go linters: - funlen @@ -184,4 +186,4 @@ issues: - path: pkg/networkservice/mechanisms/vxlan/common.go linters: - funlen - text: "Function 'create'" + text: "Function 'addDel'" diff --git a/pkg/networkservice/connectioncontext/ipcontext/routes/client.go b/pkg/networkservice/connectioncontext/ipcontext/routes/client.go index 18d2a009..24326c0e 100644 --- a/pkg/networkservice/connectioncontext/ipcontext/routes/client.go +++ b/pkg/networkservice/connectioncontext/ipcontext/routes/client.go @@ -1,4 +1,4 @@ -// Copyright (c) 2020 Cisco and/or its affiliates. +// Copyright (c) 2020-2021 Cisco and/or its affiliates. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/networkservice/mechanisms/kernel/kerneltap/client.go b/pkg/networkservice/mechanisms/kernel/kerneltap/client.go index 7817ad58..3a4bf4e0 100644 --- a/pkg/networkservice/mechanisms/kernel/kerneltap/client.go +++ b/pkg/networkservice/mechanisms/kernel/kerneltap/client.go @@ -1,4 +1,4 @@ -// Copyright (c) 2020 Cisco and/or its affiliates. +// Copyright (c) 2020-2021 Cisco and/or its affiliates. // // SPDX-License-Identifier: Apache-2.0 //