COsorio11
24ca72c351
fix typo
...
begining to beginning
2017-10-17 10:11:56 -07:00
Davor Kapsa
42e33e2d55
travis: update go versions
2017-10-09 10:47:08 -07:00
Mitchell Hashimoto
68e816d1c7
Merge pull request #210 from hashicorp/decode-number-into-float
...
Decode NUMBER into float32 and float64 fields
2017-09-14 08:46:24 -07:00
Frank Schroeder
3f6a3cf683
Decode NUMBER into float32 and float64 fields
...
This patch decodes a NUMBER value (e.g. "2") into a float32 and float64
field.
2017-09-14 14:57:19 +02:00
Mikael Olenfalk
8f6b1344a9
Return PosError instead of error in more cases
2017-08-25 10:13:36 -07:00
Jelte Fennema
392dba7d90
Support decoding HCL floats into Go float32
2017-05-09 15:53:59 -07:00
James Bardin
a4b07c25de
Merge pull request #173 from hashicorp/jbardin/crlf
...
Remove CRLF line endings
2017-05-04 15:02:34 -04:00
Mitchell Hashimoto
7fa7fff964
Merge pull request #197 from sean-/f-stray-error
...
Return an error instead of printing stray `illegal\n` to stdout.
2017-04-20 16:14:34 -07:00
Sean Chittenden
20ef8cf57f
Return an error instead of printing stray illegal\n
to stdout.
2017-04-20 16:09:49 -07:00
Mitchell Hashimoto
630949a3c5
Merge pull request #190 from hashicorp/b-singleline
...
hcl/printer: singleline objects followed by non-singleline need blank
2017-02-17 08:47:38 -08:00
Mitchell Hashimoto
b943d49ebc
Update .travis.yml
2017-02-17 08:47:33 -08:00
Mitchell Hashimoto
b979c7a8d6
hcl/printer: singleline objects followed by non-singleline need blank
...
Fixes https://github.com/hashicorp/terraform/issues/12017
2017-02-17 08:45:53 -08:00
Mitchell Hashimoto
372e8ddaa1
Merge pull request #186 from hashicorp/b-comments
...
hcl/printer: cleaner handling of standalone comments at end of file
2017-02-01 16:05:34 -08:00
Mitchell Hashimoto
47562ccf19
hcl/printer: cleaner handling of standalone comments at end of file
2017-02-01 16:03:59 -08:00
Mitchell Hashimoto
88e9565e99
Merge pull request #185 from hashicorp/f-list-of-lists
...
hcl/parser: parse list of lists
2017-01-30 13:06:51 -08:00
Mitchell Hashimoto
08c7efd78d
hcl/parser: parse list of lists
2017-01-30 13:05:20 -08:00
Mitchell Hashimoto
db4f076892
Merge pull request #184 from hashicorp/b-singleline-obj
...
hcl/printer: format single line objects to not have newline between
2017-01-24 17:06:35 -08:00
Mitchell Hashimoto
e2dbf84eb0
hcl/printer: format single line objects to not have newline between
...
Fixes #161
See #161 and test cases for examples.
2017-01-24 17:05:35 -08:00
Mitchell Hashimoto
72ac8ca2e6
Merge pull request #183 from hashicorp/b-list-comment
...
hcl/printer: preserve list comment on first line
2017-01-24 16:52:30 -08:00
Mitchell Hashimoto
efcf294794
hcl/printer: preserve list comment on first line
2017-01-24 16:51:14 -08:00
Mitchell Hashimoto
4f21d59dc7
Merge pull request #182 from hashicorp/b-comment
...
hcl/printer: format comments across multiple lines in an object
2017-01-24 16:46:15 -08:00
Mitchell Hashimoto
db65f66984
hcl/printer: format comments across multiple lines in an object
...
https://github.com/hashicorp/terraform/issues/11209
See the TF issue above for an example, and test cases for a fix. This
didn't affect any other formatting tests.
2017-01-24 16:44:23 -08:00
Mitchell Hashimoto
dfbfb1c68d
Merge pull request #181 from hashicorp/b-heredoc-single
...
hcl: print single heredoc elements properly
2017-01-24 16:28:40 -08:00
Mitchell Hashimoto
1bed77586d
hcl: print single heredoc elements properly
2017-01-24 16:26:48 -08:00
Mitchell Hashimoto
8c0b1f045f
hcl/printer: verify list element with one heredoc is formatted properly
2017-01-24 16:19:14 -08:00
Mitchell Hashimoto
39fa3a62ba
Merge pull request #180 from hashicorp/b-bool-list
...
hcl/parser: support bools in lists
2017-01-19 17:07:30 -08:00
Mitchell Hashimoto
e59762bcc7
hcl/parser: support bools in lists
2017-01-19 17:06:02 -08:00
Mitchell Hashimoto
eb6f65b2d7
Merge pull request #177 from hashicorp/b-fmt-heredoc
...
hcl/printer: newline after heredoc items in lists
2017-01-08 16:25:15 -08:00
Mitchell Hashimoto
4f76b0e04a
hcl/printer: newline after heredoc items in lists
2017-01-08 16:24:08 -08:00
Mitchell Hashimoto
e930f8e5fe
hcl/fmtcmd: include filename in error
2017-01-08 16:13:04 -08:00
Mitchell Hashimoto
80e628d796
Merge pull request #176 from theherk/feature/build-on-Go-before-1.7
...
Modify new bytes.ContainsRune to backward compatible bytes.IndexRune
2016-12-15 14:58:39 -08:00
Herkermer Sherwood
f3dd3ed758
Modify new bytes.ContainsRune to backward compatible bytes.IndexRune
2016-12-15 14:49:10 -08:00
James Bardin
dd5495f43c
Fix newlines in test-fixture
...
hcl/parser/test-fixtures/comment.hcl already contained CRLF line
endings. Convert that to unix and remove the extra cariiage returns
from comment_crlf.hcl.
2016-12-01 13:05:58 -05:00
James Bardin
aaca009935
Don't convert windows newlines
...
If the canonical newline is a single LF, don't insert CRLF in tests
2016-12-01 12:10:09 -05:00
James Bardin
a97a4ff95f
No longer preserve CRLF line endings
...
Matching the behavior of Go tooling, we are going to accept "\r\n" line
endings, but standaradize on "\n" being the official format.
Normalize line endings to "\n in the Parse function, so that we
never get stray "\r" characters in the source.
2016-12-01 12:09:33 -05:00
James Bardin
86950618a5
Don't automatically convert to CRLF in AppVeyor
...
We have test files with both types of line endings, leave them as they
are for tests.
2016-12-01 12:09:33 -05:00
Mitchell Hashimoto
37ab263305
Merge pull request #174 from kron4eg/decode-int
...
Try to use SetInt in case if possible
2016-12-01 09:17:04 -05:00
Artiom Diomin
e6cd87d208
Try to use SetInt in case if possible
...
Allows to decode aliased int types, like time.Duration
2016-12-01 16:15:23 +02:00
Mitchell Hashimoto
ae25c981c1
hcl/scanner: test \r\n endings
2016-11-30 19:39:16 -05:00
Mitchell Hashimoto
b97feebd3d
Merge pull request #172 from hashicorp/b-println
...
hcl/parser: don't print "illegal"
2016-11-30 12:58:18 -08:00
Mitchell Hashimoto
6000b27b60
hcl/parser: don't print "illegal"
...
We shouldn't output any text during parsing, that's just strange!
token.ILLEGAL happens when the scanner has an error. This error is
recorded in `scerr` during parsing which is eventually returned out.
Therefore, we handle the error properly. We can simply return a backup
error here in case we don't (scanner errors are checked first).
2016-11-30 12:55:04 -08:00
Mitchell Hashimoto
5550aaba78
Merge pull request #139 from VladRassokhin/multiline-string
...
Support EOL in string literals only in HIL fragments
2016-11-29 10:26:28 -08:00
Vladislav Rassokhin
2b0eb1f52c
Support multiline string literals in HCL only in HIL fragments
2016-11-24 22:59:50 +03:00
Mitchell Hashimoto
7cb7455c28
Merge pull request #170 from hashicorp/b-null
...
hcl: error if we scan a null char before end of input text
2016-11-21 18:11:24 -08:00
Mitchell Hashimoto
d02cd46b72
hcl: error if we scan a null char before end of input text
...
This was allowing very strange input to be allowed through to Terraform
since some encryped output will contain null characters (such as from
git crypt).
2016-11-21 18:09:54 -08:00
Mitchell Hashimoto
c3e054bfd4
Merge pull request #169 from jMarkP/duplicate-unit-test
...
Remove duplicate unit test
2016-11-12 15:52:43 -08:00
Mark Pim
fb052f74db
Remove duplicate unit test
2016-11-12 19:14:56 +00:00
Mitchell Hashimoto
3d702911d9
Merge pull request #166 from hashicorp/b-comment-indent
...
hcl/printer: multiline comments shouldn't indent lines 2+
2016-11-09 14:51:35 -08:00
Mitchell Hashimoto
be7f043b9a
hcl/printer: multiline comments shouldn't indent lines 2+
2016-11-09 14:49:37 -08:00
Mitchell Hashimoto
973f376f0e
Merge pull request #150 from hashicorp/b-escape-interp
...
[DO NOT MERGE YET] hcl: don't escape ANYTHING in ${}, let lower layer handle it
2016-11-08 16:00:27 -08:00