Skip to content

Commit

Permalink
style: fix and pretty-format .vscode/launch.json file
Browse files Browse the repository at this point in the history
This launch.json file is an autogenerated vscode-go file.
VSCode uses Json with Comments(jsonc) mode for its configuration files.

If we can find a way to introduce jsonc check to our pre-commit hooks,
we can change back the format of this file.

To read more about JsonC:
https://code.visualstudio.com/docs/languages/json#_json-with-comments

There is also an extension to JSON called Json5, Json for Humans.
https://json5.org/

Json5 formatter/checkers can be replaced with Json later.
  • Loading branch information
serdardalgic committed Nov 15, 2022
1 parent 0488add commit 7629abd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repos:
- id: pretty-format-json
types: [file] # override `types: [json]`
files: \.(json|json\.tpl)$
args: [--autofix]
args: [--autofix, --indent=4]

# pre-commit hook to verify commit messages are conventional commit compliant
# NOTE: not using the latest version of commitizen, because it doesn't verify
Expand Down
38 changes: 16 additions & 22 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,27 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Acceptance Tests",
"type": "go",
"request": "launch",
"mode": "test",
// this assumes your workspace is the root of the repo
"program": "${fileDirname}",
"args": [],
"env": {
"TF_ACC": "1",
"TF_ACC": "1"
},
"args": [],
"mode": "test",
"name": "Acceptance Tests",
"program": "${fileDirname}",
"request": "launch",
"type": "go"
},
{
"name": "Debug - Attach External CLI",
"type": "go",
"request": "launch",
"mode": "debug",
// this assumes your workspace is the root of the repo
"program": "${workspaceFolder}",
"env": {},
"args": [
// pass the debug flag for reattaching
"-debug",
"-debug"
],
"env": {},
"mode": "debug",
"name": "Debug - Attach External CLI",
"program": "${workspaceFolder}",
"request": "launch",
"type": "go"
}
]
],
"version": "0.2.0"
}

0 comments on commit 7629abd

Please sign in to comment.