last linter fixes

This commit is contained in:
Lucas Menéndez
2024-11-14 13:01:33 +01:00
parent 168f95711d
commit d65a4c3a43
4 changed files with 5 additions and 26 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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
}

6
vt.go
View File

@@ -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,