Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gometalinter fails #181

Closed
fooock opened this issue Apr 17, 2018 · 10 comments
Closed

gometalinter fails #181

fooock opened this issue Apr 17, 2018 · 10 comments
Labels
area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. kind/bug These are bugs.
Milestone

Comments

@fooock
Copy link
Contributor

fooock commented Apr 17, 2018

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
Copy link
Member

markmandel commented Apr 17, 2018

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

@markmandel markmandel added kind/bug These are bugs. area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. labels Apr 17, 2018
@fooock
Copy link
Contributor Author

fooock commented Apr 17, 2018

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
Copy link
Member

markmandel commented Apr 17, 2018

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

@EricFortin
Copy link
Collaborator

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
Copy link
Member

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

We may want to be more generous on the timeout 😕

@EricFortin
Copy link
Collaborator

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
Copy link
Contributor Author

fooock commented Apr 18, 2018

@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
Copy link
Member

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

@markmandel
Copy link
Member

Can we close this issue now?

@markmandel
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. kind/bug These are bugs.
Projects
None yet
Development

No branches or pull requests

3 participants