style: format go code on precommit

This commit is contained in:
Aarnav Tale 2025-06-09 17:48:35 -04:00
parent f4af5b920d
commit 721439868f
No known key found for this signature in database
2 changed files with 13 additions and 1 deletions

View File

@ -6,12 +6,20 @@
},
"code_actions_on_format": {
"source.fixAll.biome": true,
"source.organizeImports.biome": true
"source.organizeImports.biome": true,
"source.organizeImports": true
},
"languages": {
"YAML": {
"tab_size": 2,
"hard_tabs": false
},
"Go": {
"formatter": {
"language_server": {
"name": "gopls"
}
}
}
}
}

View File

@ -4,3 +4,7 @@ pre-commit:
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
run: pnpm biome check --write --no-errors-on-unmatched --files-ignore-unknown=true --colors=off {staged_files}
stage_fixed: true
check_go:
glob: "*.go"
run: gofmt -w {staged_files}
stage_fixed: true