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

Ensure 'run_tests.sh local' fails correctly when gometalinter errors. #846

Merged
merged 1 commit into from
Sep 10, 2017

Conversation

jpz
Copy link
Contributor

@jpz jpz commented Sep 9, 2017

For a clean install, gometalinter can return non-zero, or gometalinter
may not run at all if it is not present.

In these cases, the content of stdout is zero bytes, and the script
continues when it should error out.

This error can easily occur when initially setting up the dev project
and one has not installed gometalinter or unconvert. (This is not
a problem for docker testing, as these are preinstalled.)

Also updated README.md to describe the testing dependencies.

@davecgh
Copy link
Member

davecgh commented Sep 9, 2017

Thanks for the PR. I wonder if it should just be gometalinter --install? That will instruct gometalinter to install all of its linters. That way, if any now ones are enabled, the docs wouldn't have to be changed. The tradeoff of course is installing extra things that aren't currently used.

Errors from gemetalinter are inadertently suppressed in this code,
this commit fixes this.

run_tests.sh also automatically installs gometalinter, as a convenience
to the developer so as to reduce manual setup steps.
@jpz
Copy link
Contributor Author

jpz commented Sep 10, 2017

Thanks for feedback - gometalinter still needs to be installed, but I've put this in the run_tests.sh

After looking at the contents of the Dockerfiles, I briefly considered the merit of writing a initial_dev_setup.sh script which replicated that, so we could pare down the manual instruction in README.md, but making this smaller change seems sufficient for the moment.

@davecgh davecgh merged commit e6c2a62 into decred:master Sep 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants