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

If it doesn't build, don't check package for issues #118

Open
bradleyfalzon opened this issue Aug 14, 2017 · 0 comments
Open

If it doesn't build, don't check package for issues #118

bradleyfalzon opened this issue Aug 14, 2017 · 0 comments

Comments

@bradleyfalzon
Copy link
Owner

bradleyfalzon commented Aug 14, 2017

If a package doesn't build, tools will often echo the exact same error.

logger.With("error", err).Error("SQLDB cleanup outputs error")
  gosimple: invalid operation: logger (variable of type github.com/bradleyfalzon/gopherci/vendor/github.com/docker/docker/daemon/logger.Logger) has no field or method With
  staticcheck: invalid operation: logger (variable of type github.com/bradleyfalzon/gopherci/vendor/github.com/docker/docker/daemon/logger.Logger) has no field or method With
  unused: invalid operation: logger (variable of type github.com/bradleyfalzon/gopherci/vendor/github.com/docker/docker/daemon/logger.Logger) has no field or method With
  unparam: invalid operation: logger (variable of type github.com/bradleyfalzon/gopherci/vendor/github.com/docker/docker/daemon/logger.Logger) has no field or method With

This isn't useful at all, and should be handled more gracefully, perhaps:

  • Once we support tests Support running tests #9 , only run linters if tests pass (this could be a configuration option). But our goal should be to provide the user with as many useful errors as possible, and a test failing doesn't mean tools output won't be useful.
  • We could deduplicate the message, which may already be happening, but because we're currently hardcoding the tool in the message, tools don't deduplicate their own messages.
  • We could try and build the package before running the tool, or after the tool has ran and contains errors, potentially running go list ./..., then checking each package to ensure they can build.
@bradleyfalzon bradleyfalzon changed the title If it doesn't build, don If it doesn't build, don't check package for issues Aug 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant