Commit Graph

4 Commits

Author SHA1 Message Date
Sebastiaan van Stijn 297b30df5f
Bash scripts; use double brackets, fix bare variables, add quotes
These scripts explicitly use Bash, so we should be able to use
`[[` instead of `[` (which seems to be recommended).

Also added curly brackets to some bare variables, and quoted some paths.

This makes my IDE a bit more silent :-)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-12-24 00:05:14 +01:00
Kir Kolyshkin c11508a5f4 gometalinter: fix --deadline option
1. Add = between the option and the argument, otherwise the argument
   appears to be passed on to the linters directly, as in:

> DEBUG: [golint.8]: executing /home/kir/go/bin/golint
> -min_confidence 0.800000 ./10m ./api ./api/errdefs <...>

2. Fix setting the default for GOMETALINTER_OPTS -- the default
   was -deadline (rather than --deadline).

Fixes: b96093fa56 ("gometalinter: add per-platform configurable options")

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-01-16 14:37:11 -08:00
Kir Kolyshkin b96093fa56 gometalinter: add per-platform configurable options
I have run into two separate issues while doing 'make all' on armhf
(a Scaleway C1 machine, same as used in CI). This commit fixes both.

1. There were a lot of "not enough memory" errors, and after that
in a few runs gometalinter just stuck forever on FUTEX_WAIT with
no children left.

Looking into docs, I found the --enable-gc option which solved the issue.

[Update: this has already been added]

2. Timeout of 2 minutes is not enough for the abovementioned platform.
The longest running linter is goimports which takes almost 6 minutes to run.

Set the timeout to the observable run time roughly doubled.

In addition, ARM platforms does not have too much RAM (2GB), so
running too many processes in parallel might be problematic. Limit
it by using -j2

[v2: make the timeout arch-dependent, also tested on aarch64 (2m15s)]
[v3: moved timeout setting to Dockerfiles]
[v4: generalized to GOMETALINTER_OPTS, added -j2 for ARM platforms]
[v5: rebase to master]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2017-09-12 18:45:34 -07:00
Daniel Nephin d7e2c4ce77 Use gometalinter for linting
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-08-18 14:23:43 -04:00