Commit Graph

6 Commits

Author SHA1 Message Date
j-griffith
0ec27ea579 Remove old commented out lintcheck code
Remove the commented out code in run-lint-checks.sh, this was leftover
from when we were only linting the pkg directory, we've now extended
that out to the other .go folders in the project and this was commented
out but should've been removed.
2018-10-09 08:22:02 -06:00
j-griffith
0a84e2fa8c Add lint checks to remaining go src directories
This finishes up the last of the golint implementation, with the
addition of the cmd, tests and tools directories we are now running
golint tests on all of the current go source files in the project.

This change adds all the little fixes (mostly just commenting and
naming) and also enables the new diretories in the lint test that we
gate on.
2018-09-29 08:35:21 -06:00
John Griffith
c455577cca Fix lint errors on common package (#449)
This change just updates the common package to pass golint.  Of course
that has some reaching implications into other packages with renaming of
constants.

I've intentionally kept this patch set to the bare minimum for the lint
test, I do think that we should put some effort into our use of
constants (especially those in common.go) in the future.

Ideally we'd declare constants where they're used, and we wouldn't
export them if they don't need to be.  There are some in here that
are only used in one or two packages, and that can be cleaned up pretty
easily however it's likely that there might be plans to use them
elsewhere in the future.
2018-09-10 09:14:09 -04:00
John Griffith
73a492f5c2 Add golint enforcement to all pkgs but common (#428)
Now that the updates have merged to fix golint errors in all of the
CDI pkgs (except common) turn on lint checks to keep things up to date.

This patch does that by:
1.  Adding a check in hack/build/run-lint-checks.sh
    NOTE:  We temporarily set a list variable in the script to indicate
    the directories that we've fixed and want to enforce.  This will be
    removed when common is "lintified"
2.  Adding golint to our build containers Dockerfile
2018-09-06 09:51:12 -07:00
Jeff Vance
42a6fa1714
bug in , lots of formatting (#378) 2018-08-27 17:04:50 -07:00
j-griffith
ee839f9884 Add checkformat to Makefile and add Travis check
This adds a super simple gofmt check for Travis to run.  If there are
files that gofmt recommends updating, the check fails, if there aren't
it passes.
2018-08-24 11:18:21 -06:00