Skip to content

Commit 5e73acb

Browse files
authored
ensure that CI will fail if the code is not properly formatted
The CI would previously run `prettier --write . --check` but it should be doing `prettier --check .`
1 parent 8372c38 commit 5e73acb

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- run: npm run build
1414
- run: npm run typecheck
1515
- run: npm run lint
16-
- run: npm run format -- --check
16+
- run: npm run format:check
1717

1818
- name: package extension
1919
run: |

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@
367367
"test": "npm run compile && node ./node_modules/vscode/bin/test",
368368
"typecheck": "tsc --noEmit",
369369
"format": "prettier --write .",
370+
"format:check": "prettier --check .",
370371
"lint": "eslint ."
371372
},
372373
"devDependencies": {

src/zigMainCodeLens.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function zigRun() {
5656

5757
function escapePath(rawPath: string): string {
5858
if (/[ !"#$&'()*,;:<>?\[\\\]^`{|}]/.test(rawPath)) {
59-
return `"${rawPath.replaceAll("\"", "\"\\\"\"")}"`;
59+
return `"${rawPath.replaceAll('"', '"\\""')}"`;
6060
}
6161
return rawPath;
6262
}

0 commit comments

Comments
 (0)