Skip to content

Commit f7e2796

Browse files
authored
fix(dev): Use correct schema for GHA workflow files in VSCode (#4727)
VSCode has a feature[1] wherein it auto-detects what schema to use to validate certain JSON and yml files. The problem is, sometimes it's wrong[2], and when it is, it will throw errors* because it's misconstrued what kind of file you're editing. The incorrect association can be overridden, though, with a correct association in settings. This adds such an association, to prevent VSCode from complaining about our GHA `build` workflow. *It correctly detects that it's a GHA config, but also checks it against the schema for a different build tool[3] called `hammerkit`, and throws errors because the two schemas are incompatible [1] https://code.visualstudio.com/docs/languages/json#_json-schemas-and-settings [2] microsoft/vscode#74943 (comment) [3] https://no0dles.gitbook.io/hammerkit/
1 parent 250a911 commit f7e2796

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,8 @@
1717
"editor.formatOnType": false,
1818
"editor.formatOnPaste": false,
1919
"editor.formatOnSave": false
20-
}
20+
},
21+
"yaml.schemas": {
22+
"https://json.schemastore.org/github-workflow.json": ".github/workflows/**.yml"
23+
},
2124
}

0 commit comments

Comments
 (0)