Commit Graph

34 Commits

Author SHA1 Message Date
Emil Hessman
65878791c0 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

  482460c4c8
  fc36b1cd94
  68a41035a9
  7b704fb77d
  4f3f85b165
  95fa353ee9
  4bfe18b40d

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 problem.

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

VETARGS=-unreachable make vet

manually, just in case it detects several lines of dead code etc.
2015-01-16 22:20:32 +01:00
Mitchell Hashimoto
a7cad594df update Makefile to better switch to correct branch on updatedeps 2015-01-16 09:38:20 -08:00
Mitchell Hashimoto
35490f7812 updatedeps should checkout the last checked out branch [GH-816] 2015-01-16 09:07:12 -08:00
Sander van Harmelen
d823db5963 Removed obsolete chars 2015-01-15 22:03:43 +01:00
Sander van Harmelen
7013326c06 Let's clean up Go 1.4 checks...
No need for these as the project will not build without Go 1.4 anyway
now…
2015-01-15 22:00:08 +01:00
Mitchell Hashimoto
5abbde3ac9 config: remove unused files 2015-01-13 10:32:03 -08:00
Mitchell Hashimoto
689cbc8b5b helper/schema: generate strings for ValueType 2015-01-10 15:52:11 -08:00
Mitchell Hashimoto
d1cae92a62 Update Makefile 2015-01-10 15:24:38 -08:00
Sander van Harmelen
4dd3136ed2 Update Makefile for use with Go 1.4
`go get -u` now checks that remote repo paths match the ones predicted
by the import paths.

So if working on TF from a forked repo, you cannot use `updatedeps` as
`go get` will complain about the differences between the import and the
path to your fork.
2014-12-27 13:42:25 +01:00
Sander van Harmelen
83c760fcb3 core: refactoring the way sets work internally v2
This is a refactored solution for PR #616. Functionally this is still
the same change, but it’s implemented a lot cleaner with less code and
less changes to existing parts of TF.
2014-12-12 23:21:20 +01:00
Joseph Anthony Pasquale Holsten
fc272d5f5a quote $(CURDIR) to support $GOPATH with spaces 2014-11-25 15:29:33 -08:00
Mitchell Hashimoto
fde151978e config/module: parallelize some things 2014-09-16 12:02:35 -07:00
Mitchell Hashimoto
ef51880076 Fix phony in Makefile 2014-08-28 09:56:41 -07:00
Mitchell Hashimoto
04975827ac Remove all traces of libucl 2014-08-19 09:57:04 -07:00
Mitchell Hashimoto
e166f6ac9c make clean should remove y.go 2014-08-05 10:39:18 -07:00
Jack Pearkes
7387dd4311 makefile: increase acceptance test timeout 2014-07-31 15:22:14 -04:00
Mitchell Hashimoto
abb94de631 Makefile updatedeps requires libucl 2014-07-29 23:52:31 -07:00
Mitchell Hashimoto
b569a5d8b6 scripts: build script 2014-07-28 10:54:25 -07:00
Mitchell Hashimoto
e00aa13938 Use fork of libucl to control what checkout is used 2014-07-22 19:55:00 -07:00
Mitchell Hashimoto
498600d75f updatedeps should build the parser 2014-07-22 16:48:26 -07:00
Mitchell Hashimoto
bffdcbaede Makefile: yacc config before make 2014-07-22 15:23:05 -07:00
Mitchell Hashimoto
d257d3623f testrace won't run acceptance tests 2014-07-10 13:33:57 -07:00
Mitchell Hashimoto
10146a79b1 Explicitly disable acceptance tests for make test 2014-07-10 13:06:04 -07:00
Mitchell Hashimoto
701634ad5c Makefile 2014-07-10 11:43:32 -07:00
Mitchell Hashimoto
9d3adc07ca Add "testacc" target for easy acceptance testing 2014-07-10 11:41:18 -07:00
Mitchell Hashimoto
d970cec8eb Add testrace 2014-07-01 10:04:23 -07:00
Jack Pearkes
d6fa7f2f6d quiet the make dev task 2014-06-26 14:11:21 -04:00
Mitchell Hashimoto
00aba6ee87 update README 2014-06-26 10:33:39 -07:00
Mitchell Hashimoto
4c71eb35d8 Makefile can have specific test args 2014-06-24 14:16:26 -07:00
Mitchell Hashimoto
4c865a5169 Add make dev to make terraform dev bins 2014-06-06 20:25:17 -07:00
Mitchell Hashimoto
e904fca3da terraform: Diff! 2014-06-05 02:32:10 -07:00
Mitchell Hashimoto
612f335a74 Add curdir to path so libucl.dll is avail on Windows 2014-05-29 17:26:32 -07:00
Mitchell Hashimoto
7e06b45232 Default Makefile task should be to test 2014-05-23 17:00:51 -07:00
Mitchell Hashimoto
ec3f72703c Initial work on config 2014-05-22 16:56:28 -07:00