mirror of
https://github.com/vocdoni/arbo.git
synced 2026-01-09 13:57:54 -05:00
last linter fixes
This commit is contained in:
1
.github/workflows/lint.yml
vendored
1
.github/workflows/lint.yml
vendored
@@ -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
|
||||
|
||||
@@ -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
|
||||
4
tree.go
4
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
|
||||
}
|
||||
|
||||
|
||||
6
vt.go
6
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,
|
||||
|
||||
Reference in New Issue
Block a user