googleforgames / agones

Dedicated Game Server Hosting and Scaling for Multiplayer Games on Kubernetes
https://agones.dev
Apache License 2.0
6.06k stars 804 forks source link

gometalinter fails #181

Closed fooock closed 6 years ago

fooock commented 6 years ago

When I execute the task make test, it fails when reaches the linter task

If I open a shell using the tasks make shell and execute the command /root/gen-lint-exclude.sh && gometalinter --config .exclude.gometalinter.json --deadline 100s -t --skip vendor ./... inside it, the output is:

WARNING: deadline exceeded by linter errcheck (try increasing --deadline)
WARNING: deadline exceeded by linter unconvert (try increasing --deadline)
WARNING: deadline exceeded by linter interfacer (try increasing --deadline)
WARNING: deadline exceeded by linter megacheck (try increasing --deadline)
WARNING: deadline exceeded by linter maligned (try increasing --deadline)
WARNING: deadline exceeded by linter gocyclo (try increasing --deadline)
WARNING: deadline exceeded by linter varcheck (try increasing --deadline)
WARNING: deadline exceeded by linter structcheck (try increasing --deadline)
WARNING: deadline exceeded by linter deadcode (try increasing --deadline)

The exit code is

$ echo $?
2

My current OS is Windows10

markmandel commented 6 years ago

What happens if you extend the deadline on the linter? --deadline=5m for example?

fooock commented 6 years ago

Same error

docker run --rm -v /d/Projects/go/src/agones.dev/agones/build//.config/gcloud:/root/.config/gcloud -v ~/.kube:/root/.kube -v /d/Projects/go/src/agones.dev/agones:/go/src/agones.dev/agones -w /go/src/agones.dev/agones  agones-build:e52ce865fb bash -c \
        "/root/gen-lint-exclude.sh && gometalinter --config .exclude.gometalinter.json --deadline 5m -t --skip vendor ./..."
Makefile:136: recipe for target 'lint' failed
make: *** [lint] Error 2
markmandel commented 6 years ago

I don't see any error, so is it the same error, or did something else fail?

EricFortin commented 6 years ago

Silly question, what kind of hardware do you have @fooock ? Gometalinter is kind of heavy and was slowing my system down even though I have a Core i5 7th gen in my laptop.

markmandel commented 6 years ago

Yeah, I find gometalinter slows down my machine as well something terrible.

We may want to be more generous on the timeout :confused:

EricFortin commented 6 years ago

You could also try to add --disable-all -E errcheck to run a single linter to ensure you can at least run one successfully. I didn't test on windows since we run this in the build image.

fooock commented 6 years ago

@EricFortin if I add these lines the exit is successful

root@50e1f8589e8c:/go/src/agones.dev/agones# /root/gen-lint-exclude.sh && \
    gometalinter --disable-all \
    -E errcheck \
    --config .exclude.gometalinter.json \
    --deadline 100s -t --skip vendor ./...
root@50e1f8589e8c:/go/src/agones.dev/agones# echo $?
0

Update

@markmandel yes, the same error:

root@867212989e00:/go/src/agones.dev/agones# /root/gen-lint-exclude.sh && \
    gometalinter --config .exclude.gometalinter.json --deadline 5m -t --skip vendor ./...
WARNING: deadline exceeded by linter structcheck (try increasing --deadline)
WARNING: deadline exceeded by linter megacheck (try increasing --deadline)
WARNING: deadline exceeded by linter golint (try increasing --deadline)
WARNING: deadline exceeded by linter interfacer (try increasing --deadline)
WARNING: deadline exceeded by linter unconvert (try increasing --deadline)
WARNING: deadline exceeded by linter varcheck (try increasing --deadline)
WARNING: deadline exceeded by linter errcheck (try increasing --deadline)
root@867212989e00:/go/src/agones.dev/agones# echo $?
2

@EricFortin my hardware is i7 6700HQ + 16GB RAM + 256GB SSD

markmandel commented 6 years ago

Let's go bigger on the deadline :+1: it may just take a while. gometalinter is quite cpu intensive.

markmandel commented 6 years ago

Can we close this issue now?

markmandel commented 6 years ago

Due to inactivity, I'll close this issue now. If it is still an issue, please submit a PR with an extension to the timeout deadline.