Skip to content

bin/runlinter.sh broken #471

@ldemailly

Description

@ldemailly

used to work before #463

  • bin/linter.sh -h yields bin/linters.sh: line 19: error_exit: command not found (all OSes)
  • bin/linters.sh: line 62: declare: -A: invalid option when using -s HEAD on mac
  • it also doesn't seem to work even on linux / select touched files (see log below)
  • it should get the go packages list from bazel

Details : problem 2:

Running linters
All known packages are ./tests/e2e/... ./devel/githubContrib
Using HEAD to compare files to.
bin/linters.sh: line 62: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]

Mac/old bash only problem I guess

Details: Problem 3:

$ bin/linter.sh -s 3a429c7dae6fe1361fbfe525b4ba9eab311538ff
Running linters
All known packages are ./tests/e2e/... ./devel/githubContrib
Using 3a429c7dae6fe1361fbfe525b4ba9eab311538ff to compare files to.
Running linters on packages .
Done running linters
ldemailly@benchmark-1:~/go/src/istio.io/istio$ git diff 3a429c7dae6fe1361fbfe525b4ba9eab311538ff
diff --git a/devel/fortio/stats.go b/devel/fortio/stats.go
index 44f6e92..10a1139 100644
--- a/devel/fortio/stats.go
+++ b/devel/fortio/stats.go
@@ -292,7 +292,7 @@ func (h *Histogram) Log(msg string, percentile float64) {
        var b bytes.Buffer
        w := bufio.NewWriter(&b)
        h.Print(w, msg, percentile)
-       w.Flush() // nolint: gas,errcheck
+       w.Flush()
        log.Print(string(b.Bytes()))
 }
 

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions