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

Added basic line indenting to HCL languages. #6127

Merged
merged 6 commits into from
Jul 7, 2023

Conversation

lkishalmi
Copy link
Contributor

Making HCL editing a bit easier...

Copy link
Contributor

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

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

Looks mostly sane to me. I have one problem with this: It introduces trailing whitespace on empty lines. I noticed this when I tested this with the example.tf file. It looked (and is) well indented, yet the file becomes modified, because the empty lines in the blocks get space injected.

@lkishalmi
Copy link
Contributor Author

Thanks for reporting that!

I'm working on some tests, as some of the (edge) cases might be not handled well. And now I wish we have Java 17 Textblocks...

Copy link
Contributor

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

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

Eyeballed this and looks sane to me. My tests, though limited, worked ok.

Copy link
Contributor

@vieiro vieiro left a comment

Choose a reason for hiding this comment

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

Go for it, @lkishalmi !

@lkishalmi lkishalmi merged commit faf308b into apache:master Jul 7, 2023
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants