From d65a4c3a43d016325357042fc313878cb91fc2f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Men=C3=A9ndez?= Date: Thu, 14 Nov 2024 13:01:33 +0100 Subject: [PATCH] last linter fixes --- .github/workflows/lint.yml | 1 - .golangci.yml | 20 -------------------- tree.go | 4 ++-- vt.go | 6 +++--- 4 files changed, 5 insertions(+), 26 deletions(-) delete mode 100644 .golangci.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index cb633c2..7e3ef0d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,7 +19,6 @@ jobs: uses: golangci/golangci-lint-action@v3 with: version: latest - args: --timeout 5m --verbose -D unused skip-cache: false skip-pkg-cache: false skip-build-cache: false diff --git a/.golangci.yml b/.golangci.yml deleted file mode 100644 index c899fc9..0000000 --- a/.golangci.yml +++ /dev/null @@ -1,20 +0,0 @@ -issues: - max-same-issues: 0 - exclude-use-default: false -linters: - enable: - - whitespace - - gosec - - gci - - misspell - - gomnd - - gofmt - - goimports - - lll - - golint - - gocyclo - disable: - - unused -linters-settings: - lll: - line-length: 100 diff --git a/tree.go b/tree.go index c9b98ea..ca36cd6 100644 --- a/tree.go +++ b/tree.go @@ -1555,7 +1555,7 @@ func (t *Tree) PrintGraphvizFirstNLevels(fromRoot []byte, untilLvl int) error { } w := bytes.NewBufferString("") if _, err := fmt.Fprintf(w, - "--------\nGraphviz of the Tree with Root "+hex.EncodeToString(fromRoot)+":\n"); err != nil { + "--------\nGraphviz of the Tree with Root %s:\n", hex.EncodeToString(fromRoot)); err != nil { return err } err := t.GraphvizFirstNLevels(w, fromRoot, untilLvl) @@ -1564,7 +1564,7 @@ func (t *Tree) PrintGraphvizFirstNLevels(fromRoot []byte, untilLvl int) error { return err } if _, err := fmt.Fprintf(w, - "End of Graphviz of the Tree with Root "+hex.EncodeToString(fromRoot)+"\n--------\n"); err != nil { + "End of Graphviz of the Tree with Root %s\n--------\n", hex.EncodeToString(fromRoot)); err != nil { return err } diff --git a/vt.go b/vt.go index b24293d..4b0d503 100644 --- a/vt.go +++ b/vt.go @@ -625,7 +625,7 @@ func (n *node) computeHashes(currLvl, maxLvl int, p *params, pairs [][2][]byte) return pairs, nil } -//nolint:all +//nolint:unused func (t *vt) graphviz(w io.Writer) error { if _, err := fmt.Fprintf(w, `digraph hierarchy { node [fontname=Monospace,fontsize=10,shape=box] @@ -641,7 +641,7 @@ node [fontname=Monospace,fontsize=10,shape=box] return nil } -//nolint:all +//nolint:unused func (n *node) graphviz(w io.Writer, p *params, nEmpties int) (int, error) { if n == nil { return nEmpties, nil @@ -720,7 +720,7 @@ func (n *node) graphviz(w io.Writer, p *params, nEmpties int) (int, error) { return nEmpties, nil } -//nolint:all +//nolint:unused func (t *vt) printGraphviz() error { w := bytes.NewBufferString("") if _, err := fmt.Fprintf(w,