Commit Graph

20 Commits (0d77f62c02cbf2e88547cd3d114e948a1fdb3371)

Author SHA1 Message Date
Kenichi Omichi 08dc056480 Replace `false` with `exit 1`
Some scripts contained `false` for returning 1 to callers instead of
`exit 1` and that works like:

  $ false
  $ echo $?
  1
  $

But that made confusion in a PR review process.
So this replaces `false` with `exit 1` for long-term maintenance.
2019-04-16 23:13:00 +00:00
Kenichi Omichi 4a91b593ba Use kube::util::array_contains() in hack
The common kube::util::array_contains() is already there, so this
makes both scripts use it.
2019-02-08 23:13:48 +00:00
Kenichi Omichi c32d1acbb9 Add check-file-in-alphabetical-order for cleanup
Both verify-golint.sh and verify-shellcheck.sh have the same logic
which checks failure_file in alphabetical order.
In addition, we'd like to add another script which requires the
same logic. So this add a common function for cleanup.
2019-01-26 02:09:06 +00:00
Sen Lu 6b7ccc9aaa always use golint from vendor 2018-12-27 12:05:45 -08:00
Sen Lu f2604ddc62 install golint from vendor 2018-12-26 10:42:24 -08:00
k8s-ci-robot 199cd1b8af
Merge pull request #69369 from mikechernev/improve-verify-golint
Make the golint verify script MacOS compatible
2018-10-22 19:44:11 -07:00
Maciej Szulik 13016b9ab9
Update golint download URL 2018-10-12 11:45:54 +02:00
Mike Chernev a34817238a Make the golint verify script MacOS compatible 2018-10-03 15:30:59 +02:00
Christoph Blecker f4834bbc32
Fix golint command to only pass a single *.go file at a time 2018-08-21 21:53:21 -07:00
Christoph Blecker 5b6639922d
Convert tabs to spaces 2018-08-21 18:54:46 -07:00
Matthias Bertschy 9b15af19b2 Update all script to use /usr/bin/env bash in shebang 2018-04-19 13:20:13 +02:00
Joe Finney ab5e285197 Invert .linted_packages into .golint_failures. 2017-07-17 14:37:40 -07:00
xiangpengzhao c265719759 Check if golint exists first in hack/verify-golint.sh 2017-07-05 14:51:51 +08:00
Dr. Stefan Schimanski 81461f7214 hack/verify-golint: enforce cleanup of old packages 2017-01-24 08:34:06 +01:00
Dr. Stefan Schimanski 8f85e11e6a hack/verify-golint.sh: add authorative staging packages 2017-01-24 08:32:19 +01:00
Eric Paris b670f76232 Use LC_ALL=C with sort
In some user env LANG=C might lose:

Wrong:
```
echo -e "test/images/port-forward-tester\ntest/images/porter" | LANG=C sort
test/images/porter
test/images/port-forward-tester
```
Right:
```
echo -e "test/images/port-forward-tester\ntest/images/porter" | LC_ALL=C sort
test/images/port-forward-tester
test/images/porter
```
2016-10-19 09:47:21 -04:00
Davanum Srinivas 773e1c7f93 fix hack/verify-golint.sh to work outside of GOPATH
"go list -e ./..." returns different results when run from
the usual GOPATH location (returns k8s.io/kubernetes as prefix)
and when run outside of it (returns _ followed by full path of
the file). We need to support both scenarios.

Fixes #31905
2016-09-08 11:07:49 -04:00
Random-Liu 5d11de1c2e Fix sort hint in `hack/verify-golint.sh`. 2016-08-24 20:55:14 -07:00
Dr. Stefan Schimanski 4b38912ae6 Check sorting of linted file in hack/verify-golint.sh 2016-08-23 13:46:13 +02:00
Jess Frazelle 70d860fe08
Start verifying golint on a per-package basis as packages are fixed
Signed-off-by: Jess Frazelle <me@jessfraz.com>
2016-08-10 17:40:06 -07:00