Commit Graph

29 Commits

Author SHA1 Message Date
Christopher Goes dbd4f30b39 Merge branch 'develop' into dev/lock_tools 2018-10-11 08:48:15 +02:00
Christopher Goes 0ef1582aeb Disable unparam 2018-10-11 01:53:17 +02:00
ValarDragon 9e334afad0 Lock binary dependencies to a specific commits / versions
This is basically copying over @anton's great script!

Also had to run `make format` to make this pass `test_lint`.
This PR also makes the make commands for tools further align
with the tendermint implementation.
2018-10-09 23:52:36 -07:00
HaoyangLiu 9f67e8af20 Merge PR #2215: Add swagger-ui for gaiacli lite-server 2018-10-04 13:00:24 +02:00
Christopher Goes 17983460b8
Merge PR #2219: Update to Tendermint 0.24 (except NextValSet offsets) 2018-10-03 17:48:23 +02:00
Alexander Bezobchuk 611e287375 Merge PR #2401: Remove remnants of gocyclo 2018-09-25 13:45:04 -04:00
ValarDragon 9b26ccfa76 tools: Remove gocyclo
We can investigate re-introducing our own fork #postlaunch.
Closes #2211
2018-09-03 21:31:20 -07:00
rigelrozanski 423d0c4a18 Merge remote-tracking branch 'origin/develop' into cwgoes/a-random-walk-down-proof-of-stake 2018-07-19 01:56:42 -04:00
Dev Ojha 6cfef64382 Merge PR #1732: tools: add make {get, update, check}_dev_tools
This is so that validators can have a more minimal install, but we
can still install linters for developers. (And any other future dev
tools)
2018-07-18 10:20:24 +02:00
Christopher Goes a4e7216b36 Fix gocyclo check 2018-07-17 02:29:46 +02:00
ValarDragon 0c5358c267 Continue reducing code complexity:
* Adds a Min function to Int, and uses that in the slash function
* Adds a getHeight helper function to iavlstore
* Adds a splitPath function to baseapp
* Changes cyclo param from 10 to 11
2018-07-09 15:29:16 -07:00
ValarDragon a768543d92 tools: Add code complexity linter, gocyclo
Gocyclo is a code complexity linter. It uses cyclomatic complexity.
Cyclomatic complexity essentially measures the number of different
paths code could go through. (The conditional in a for loop counts
as adding one path) It looks at this on a per-function level. The
idea that this would be enforcing is that if there are too many
different paths code can go through in a function, it needs to be
better split up. (A function with too many code paths is hard to
reason about)

The complexity which we want the linter to start failing on is
configurable. The default is 10. Change the "Cyclo" parameter in
`tools/gometalinter.json` to try other values.
2018-07-09 15:29:16 -07:00
ValarDragon 08e98d3124 tools: Switch gometalinter to use a config file 2018-07-07 12:00:06 -07:00
Dev Ojha 097dd8a164 tools: Add unparam linter (#1443)
* tools: Add unparam linter

unparam detects unused parameters in functions, and a parameter to
a function which only ever takes on one value. The latter is an
indication that more tests are required.

There are many nolints in this PR, as I believe that writing tests
to fix alot of these situations is out of scope for this PR / it
will be changed in future commits. There are some nolints for
when we have to comply to normal api's.

* crypto/keys no longer used by x/gov/client/rest/rest.go
2018-06-29 18:22:24 -04:00
Dev Ojha ac3adff1e8 Merge PR #1438: Tools: Add errcheck linter
This linter ensures that all errors are checked.
This is disabled in the client directories, since its not needed on
those writes
2018-06-29 00:52:10 +02:00
Dev Ojha 3e14868bd6 Merge PR #1429: tools: Add ineffassign linter
* tools: Add ineffassign linter

This errors on assignments that don't actually do anything. i.e.

x, err := myFunc(1)
y, err = myFunc(2)

This will call out that the first function's call error was never
used.

* Fix makefile, add misspell to makefile
2018-06-28 19:12:02 +02:00
Dev Ojha 2755c66545 Merge PR #1424: tools: add unconvert linter
unconvert checks for unnecessary type conversions
2018-06-28 18:08:29 +02:00
Dev Ojha 15bba919e2 Merge PR #1341: Switch gometalinter to stable
* Switch gometalinter to stable
* Delete empty folder
2018-06-22 22:08:50 +02:00
Dev Ojha 7f1169db4d Merge PR #1337: tools: Fix makefile install scripts
Previously, the install scripts weren't installing golint and gometalinter.
This commit fixes this, and installs tendermints linter, and the HEAD of
the gometalinter repository. Now make all should work.
2018-06-22 20:01:44 +02:00
Pin Zhang fe3236da61 Fix bug: make will fail if the path contains whitespace 2018-03-09 13:06:36 +08:00
Ethan Buchman b5471212cf dont import metalinter 2018-03-08 19:48:17 +00:00
Ethan Buchman f25c9fc06a tools: get_tools 2018-03-08 19:48:17 +00:00
Adrian Brink e3c68e2640 Dep now works. Metalinter is broken 2018-03-08 19:48:17 +00:00
Adrian Brink c42f036318 Fix build, just tools/ missing 2018-03-08 19:48:17 +00:00
rigelrozanski 6f492b862c deleted glide files 2018-03-08 19:48:17 +00:00
Zaki Manian 9afe696bf4 Replace glide with dep 2018-03-08 19:48:17 +00:00
Zaki Manian ce689ab4f3 Switch dependency resolution to dep and update Makefile to use dep 2018-03-08 19:48:17 +00:00
Ethan Frey 43ea579079 Tools uses glide, not gopkg.in for versioning 2018-03-01 02:36:57 +00:00
Jae Kwon 81b6012021 Vendor tools into tools/* (#331)
* Add tools dir
* Update Makefile to call tools/Makefile
* Add cmd/basecoind to make make pass
2018-01-16 11:24:20 -08:00