Merge pull request #12049 from hashicorp/b-update-hcl

vendor: update HCL (formatting)
This commit is contained in:
Mitchell Hashimoto 2017-02-17 08:56:40 -08:00 committed by GitHub
commit d1ecaff6f6
2 changed files with 39 additions and 26 deletions

View File

@ -176,10 +176,23 @@ func (p *printer) output(n interface{}) []byte {
// Always write a newline to separate us from the next item
buf.WriteByte(newline)
// If the next item is an object that is exactly one line,
// then we don't output another newline.
// Need to determine if we're going to separate the next item
// with a blank line. The logic here is simple, though there
// are a few conditions:
//
// 1. The next object is more than one line away anyways,
// so we need an empty line.
//
// 2. The next object is not a "single line" object, so
// we need an empty line.
//
// 3. This current object is not a single line object,
// so we need an empty line.
current := t.Items[index]
next := t.Items[index+1]
if next.Pos().Line != t.Items[index].Pos().Line+1 || !p.isSingleLineObject(next) {
if next.Pos().Line != t.Items[index].Pos().Line+1 ||
!p.isSingleLineObject(next) ||
!p.isSingleLineObject(current) {
buf.WriteByte(newline)
}
}

46
vendor/vendor.json vendored
View File

@ -1711,68 +1711,68 @@
{
"checksumSHA1": "Ok3Csn6Voou7pQT6Dv2mkwpqFtw=",
"path": "github.com/hashicorp/hcl",
"revision": "372e8ddaa16fd67e371e9323807d056b799360af",
"revisionTime": "2017-02-02T00:05:34Z"
"revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b",
"revisionTime": "2017-02-17T16:47:38Z"
},
{
"checksumSHA1": "XQmjDva9JCGGkIecOgwtBEMCJhU=",
"path": "github.com/hashicorp/hcl/hcl/ast",
"revision": "372e8ddaa16fd67e371e9323807d056b799360af",
"revisionTime": "2017-02-02T00:05:34Z"
"revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b",
"revisionTime": "2017-02-17T16:47:38Z"
},
{
"checksumSHA1": "DaQmLi48oUAwctWcX6A6DNN61UY=",
"path": "github.com/hashicorp/hcl/hcl/fmtcmd",
"revision": "372e8ddaa16fd67e371e9323807d056b799360af",
"revisionTime": "2017-02-02T00:05:34Z"
"revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b",
"revisionTime": "2017-02-17T16:47:38Z"
},
{
"checksumSHA1": "MGYzZActhzSs9AnCx3wrEYVbKFg=",
"path": "github.com/hashicorp/hcl/hcl/parser",
"revision": "372e8ddaa16fd67e371e9323807d056b799360af",
"revisionTime": "2017-02-02T00:05:34Z"
"revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b",
"revisionTime": "2017-02-17T16:47:38Z"
},
{
"checksumSHA1": "/cGXzX8tBvN1mu0mNvGzURdiqHU=",
"checksumSHA1": "gKCHLG3j2CNs2iADkvSKSNkni+8=",
"path": "github.com/hashicorp/hcl/hcl/printer",
"revision": "372e8ddaa16fd67e371e9323807d056b799360af",
"revisionTime": "2017-02-02T00:05:34Z"
"revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b",
"revisionTime": "2017-02-17T16:47:38Z"
},
{
"checksumSHA1": "z6wdP4mRw4GVjShkNHDaOWkbxS0=",
"path": "github.com/hashicorp/hcl/hcl/scanner",
"revision": "372e8ddaa16fd67e371e9323807d056b799360af",
"revisionTime": "2017-02-02T00:05:34Z"
"revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b",
"revisionTime": "2017-02-17T16:47:38Z"
},
{
"checksumSHA1": "oS3SCN9Wd6D8/LG0Yx1fu84a7gI=",
"path": "github.com/hashicorp/hcl/hcl/strconv",
"revision": "372e8ddaa16fd67e371e9323807d056b799360af",
"revisionTime": "2017-02-02T00:05:34Z"
"revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b",
"revisionTime": "2017-02-17T16:47:38Z"
},
{
"checksumSHA1": "c6yprzj06ASwCo18TtbbNNBHljA=",
"path": "github.com/hashicorp/hcl/hcl/token",
"revision": "372e8ddaa16fd67e371e9323807d056b799360af",
"revisionTime": "2017-02-02T00:05:34Z"
"revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b",
"revisionTime": "2017-02-17T16:47:38Z"
},
{
"checksumSHA1": "138aCV5n8n7tkGYMsMVQQnnLq+0=",
"path": "github.com/hashicorp/hcl/json/parser",
"revision": "372e8ddaa16fd67e371e9323807d056b799360af",
"revisionTime": "2017-02-02T00:05:34Z"
"revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b",
"revisionTime": "2017-02-17T16:47:38Z"
},
{
"checksumSHA1": "YdvFsNOMSWMLnY6fcliWQa0O5Fw=",
"path": "github.com/hashicorp/hcl/json/scanner",
"revision": "372e8ddaa16fd67e371e9323807d056b799360af",
"revisionTime": "2017-02-02T00:05:34Z"
"revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b",
"revisionTime": "2017-02-17T16:47:38Z"
},
{
"checksumSHA1": "fNlXQCQEnb+B3k5UDL/r15xtSJY=",
"path": "github.com/hashicorp/hcl/json/token",
"revision": "372e8ddaa16fd67e371e9323807d056b799360af",
"revisionTime": "2017-02-02T00:05:34Z"
"revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b",
"revisionTime": "2017-02-17T16:47:38Z"
},
{
"checksumSHA1": "2Nrl/YKrmowkRgCDLhA6UTFgYEY=",