mirror of
https://github.com/numtide/treefmt.git
synced 2024-08-17 04:40:27 +03:00
parent
66959743ba
commit
da42d37d6c
@ -22,11 +22,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1663669617,
|
||||
"narHash": "sha256-yUrzkRDc6P3hsI5TdQ5+q8gnyjadNvaM3MMEsEVS8qk=",
|
||||
"lastModified": 1663819708,
|
||||
"narHash": "sha256-nKyJpwzGoV+5BNLHlrEMawsDxR1i6WOXqTcHWrWE8y4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "41ac0bd371618db6dd67fd952cc5b3d6a9955a15",
|
||||
"rev": "f586d35a11ec07ced41d9d62c125c6ca0006141f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
16
treefmt.toml
16
treefmt.toml
@ -75,16 +75,8 @@ shfmt -i 2 -s -w "$@"
|
||||
includes = ["*.sh"]
|
||||
|
||||
[formatter.terraform]
|
||||
# Terraform fmt only takes one file at the time so we create a wrapper.
|
||||
# See https://github.com/numtide/treefmt/issues/97
|
||||
command = "/bin/sh"
|
||||
options = [
|
||||
"-euc",
|
||||
"""
|
||||
for f in "$@"; do
|
||||
terraform fmt "$f"
|
||||
done
|
||||
""",
|
||||
"--", # bash swallows the second argument when using -c
|
||||
]
|
||||
# Careful, only terraform 1.3.0 or later accept a list of files.
|
||||
# see https://github.com/numtide/treefmt/issues/97
|
||||
command = "terraform"
|
||||
options = ["fmt"]
|
||||
includes = ["*.tf"]
|
||||
|
Loading…
Reference in New Issue
Block a user