Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a wrong error message for bitwise OR #380

Merged
merged 1 commit into from
Jun 25, 2020

Conversation

minamijoyo
Copy link
Contributor

Fixes #376

before

$ echo 'foo = a | b' | go run ./cmd/hclfmt/main.go -check
Error: Unsupported operator

  on <stdin> line 1:
   1: foo = a | b

Bitwise operators are not supported. Did you mean boolean OR ("&&")?

Error: Missing newline after argument

  on <stdin> line 1:
   1: foo = a | b

An argument definition must end with a newline.

one or more files contained errors
exit status 1

after

$ echo 'foo = a | b' | go run ./cmd/hclfmt/main.go -check
Error: Unsupported operator

  on <stdin> line 1:
   1: foo = a | b

Bitwise operators are not supported. Did you mean boolean OR ("||")?

Error: Missing newline after argument

  on <stdin> line 1:
   1: foo = a | b

An argument definition must end with a newline.

one or more files contained errors
exit status 1

Copy link

@azr azr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, LGTM

@alisdair
Copy link
Member

Thanks for fixing this! I'm merging now and it will go out with the next release. Sorry for the delay.

@alisdair alisdair merged commit ea60f7f into hashicorp:hcl2 Jun 25, 2020
@minamijoyo
Copy link
Contributor Author

Thanks 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants