Commit Graph

15 Commits

Author SHA1 Message Date
Ryan Uber bbed69867a Build consul to a temp dir for API tests 2015-04-11 13:21:56 -07:00
Ryan Uber ab9e13ffb6 Use separate updatedeps target for Makefile 2015-01-22 17:37:35 -08:00
Armon Dadgar 7d6b271fa2 Adding fast-path for testing without depedency updates 2015-01-20 15:31:57 -08:00
Emil Hessman 5f3d19db38 Makefile: update dependencies
Prevent build failures which may occur when dependencies is
not up to date by updating them with the go get -u flag.

Add the go get -f flag as well, to override the check that
each package has been checked out from the repo implied by
its import path.
2015-01-18 05:30:52 +01:00
Emil Hessman 8f9e8a4d6f Makefile: add vet target
Add a vet target in order to catch suspicious constructs
reported by go vet.

Vet has successfully detected problems in the past,
for example, see

  c9333b1b9b472feb5cad80e2c8276d41b64bde88

Some vet flags are noisy. In particular, the following flags
reports a large amount of generally unharmful constructs:

```
  -assign: check for useless assignments
  -composites: check that composite literals used field-keyed
               elements
  -shadow: check for shadowed variables
  -shadowstrict: whether to be strict about shadowing
  -unreachable: check for unreachable code
```

In order to skip running the flags mentioned above, vet is
invoked on a directory basis with `go tool vet .` since package-
level type-checking with `go vet` doesn't accept flags.

Hence, each file is vetted in isolation, which is weaker than
package-level type-checking. But nevertheless, it might catch
suspicious constructs that pose a real issue.

The vet target runs the following flags on the entire repo:

```
  -asmdecl: check assembly against Go declarations
  -atomic: check for common mistaken usages of the
           sync/atomic package
  -bool: check for mistakes involving boolean operators
  -buildtags: check that +build tags are valid
  -copylocks: check that locks are not passed by value
  -methods: check that canonically named methods are canonically
            defined
  -nilfunc: check for comparisons between functions and nil
  -printf: check printf-like invocations
  -rangeloops: check that range loop variables are used correctly
  -shift: check for useless shifts
  -structtags: check that struct field tags have canonical format
               and apply to exported fields as needed
  -unsafeptr: check for misuse of unsafe.Pointer
```

Now and then, it might make sense to check the output of the
disabled flags manually.
For example, `VETARGS=-unreachable make vet` can detect several
lines of dead code that can be deleted, etc.
2015-01-17 07:44:25 +01:00
Chavez 72904e39bd Separate cover target for tests 2014-12-05 18:47:23 -08:00
Chavez 904b14dc93 Fix typo 2014-12-04 23:11:47 -08:00
Chavez 12966dc9f7 Vagrant updates
* Add go tools to provision script
* Sync project folder
* Fix ruby styling issues
* Add --cover flag to test commands
2014-12-04 21:24:05 -08:00
Armon Dadgar 1deccbe074 Adding script to verify no UUID generation done in state store 2014-10-09 11:31:28 -07:00
Nelson Elhage 84adb708db Fix a Makefile typo.
The broken .PHONY declaration is breaking Travis: 'make deps' is now a
no-op, because of the new 'deps' directory.
2014-06-29 18:22:44 -07:00
Ultrabug 036b9a527d fix make dependency for the format target 2014-06-03 14:54:04 +02:00
Carlos Diaz-Padron c6dc651576 Add format task to all and silence large output 2014-05-06 01:48:18 -04:00
Carlos Diaz-Padron cc44a2fcb9 Add make format task 2014-05-06 01:38:21 -04:00
Carlos Diaz-Padron 89a68f5fb2 Use proper shell expansion in Makefile 2014-05-06 01:34:24 -04:00
Armon Dadgar 94ff23d2a4 consul: adding basic skeleton 2013-12-06 15:43:07 -08:00