You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ts...@apache.org on 2022/07/27 07:12:13 UTC
[camel-k] branch main updated: fix(lint): nolintlint
This is an automated email from the ASF dual-hosted git repository.
tsato pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
The following commit(s) were added to refs/heads/main by this push:
new 74f378b1e fix(lint): nolintlint
74f378b1e is described below
commit 74f378b1ebcb593462c96549c08b8dc6a7d815c1
Author: Tadayoshi Sato <sa...@gmail.com>
AuthorDate: Wed Jul 27 14:11:44 2022 +0900
fix(lint): nolintlint
---
.github/workflows/validate.yml | 5 ++---
pkg/cmd/run_help.go | 11 -----------
pkg/util/resource/config.go | 4 ++--
3 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml
index f2b068aed..a141b2450 100644
--- a/.github/workflows/validate.yml
+++ b/.github/workflows/validate.yml
@@ -42,10 +42,9 @@ jobs:
with:
go-version: 1.17.x
- name: golangci-lint
- uses: golangci/golangci-lint-action@v2
+ uses: golangci/golangci-lint-action@v3
env:
GOGC: 20
with:
- version: v1.47.1
- skip-go-installation: true
+ version: v1.47.2
args: --verbose --deadline 15m --config .golangci.yml
diff --git a/pkg/cmd/run_help.go b/pkg/cmd/run_help.go
index e35d54a55..1f868292d 100644
--- a/pkg/cmd/run_help.go
+++ b/pkg/cmd/run_help.go
@@ -19,7 +19,6 @@ package cmd
import (
"context"
- "crypto/sha1"
"fmt"
"path"
"strings"
@@ -33,16 +32,6 @@ import (
corev1 "k8s.io/api/core/v1"
)
-func hashFrom(contents ...[]byte) string {
- // SHA1 because we need to limit the length to less than 64 chars
- hash := sha1.New()
- for _, c := range contents {
- hash.Write(c)
- }
-
- return fmt.Sprintf("%x", hash.Sum(nil))
-}
-
func parseConfigAndGenCm(ctx context.Context, cmd *cobra.Command, c client.Client, config *resource.Config, integration *v1.Integration, enableCompression bool) (*corev1.ConfigMap, error) {
switch config.StorageType() {
case resource.StorageTypeConfigmap:
diff --git a/pkg/util/resource/config.go b/pkg/util/resource/config.go
index 197e3fef5..bbcecbebf 100644
--- a/pkg/util/resource/config.go
+++ b/pkg/util/resource/config.go
@@ -19,7 +19,7 @@ package resource
import (
"context"
- "crypto/sha1"
+ "crypto/sha1" // nolint: gosec
"fmt"
"path/filepath"
"regexp"
@@ -237,7 +237,7 @@ func ConvertFileToConfigmap(ctx context.Context, c client.Client, config *Config
func hashFrom(contents ...[]byte) string {
// SHA1 because we need to limit the length to less than 64 chars
- hash := sha1.New()
+ hash := sha1.New() // nolint: gosec
for _, c := range contents {
hash.Write(c)
}