OmarTawfik / github-actions-js

Provides linting APIs on the command line, through Node.js, and rich code editing through VSCode.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: Format Document should be compatible with HCL's fmt

syntaqx opened this issue ยท comments

After installing your extension I formatted the main.workflow in my project and got different output than that of terraform fmt.

Given GitHub actions use HCL, and Terraform is written by Hashicorp, I believe that the formatting output of your extension should be explicitly the same.

With terraform fmt:

workflow "Example" {
  on       = "push"
  resolves = ["Go Modules"]
}

action "Go Modules" {
  uses = "actions-contrib/go@master"
  args = "mod download"
}

With VSCode's Format Document:

workflow "Example" {
   on = "push"
   resolves = ["Go Modules"]
}

action "Go Modules" {
  uses = "actions-contrib/go@master"
  args = "mod download"
}

Notice the explicit indentation variations.

Also, great work on the extension so far. It's been much nicer to integrate with than the others I've tried.

Thanks a lot for looking into it!
I'll take a look at terraform fmt and see what I can do here.

๐ŸŽ‰ This issue has been resolved in version 2.7.0 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€