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 committed Feb 22, 2025
1 parent 4ac964b commit c209af4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 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
2 changes: 1 addition & 1 deletion src/zls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ async function configurationMiddleware(
inspect?.globalValue === undefined &&
inspect?.workspaceValue === undefined &&
inspect?.workspaceFolderValue === undefined;
if(isDefaultValue) {
if (isDefaultValue) {
result[index] = null;
}
}
Expand Down

0 comments on commit c209af4

Please sign in to comment.