Skip to content

Commit

Permalink
ensure that CI will fail if the code is not properly formatted
Browse files Browse the repository at this point in the history
The CI would previously run `prettier --write . --check` but it should
be doing `prettier --check .`
  • Loading branch information
Techatrix authored Feb 22, 2025
1 parent 8372c38 commit 5e73acb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- run: npm run build
- run: npm run typecheck
- run: npm run lint
- run: npm run format -- --check
- run: npm run format:check

- name: package extension
run: |
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@
"test": "npm run compile && node ./node_modules/vscode/bin/test",
"typecheck": "tsc --noEmit",
"format": "prettier --write .",
"format:check": "prettier --check .",
"lint": "eslint ."
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/zigMainCodeLens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function zigRun() {

function escapePath(rawPath: string): string {
if (/[ !"#$&'()*,;:<>?\[\\\]^`{|}]/.test(rawPath)) {
return `"${rawPath.replaceAll("\"", "\"\\\"\"")}"`;
return `"${rawPath.replaceAll('"', '"\\""')}"`;
}
return rawPath;
}
Expand Down

0 comments on commit 5e73acb

Please sign in to comment.