Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .c8rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"all": true,
"src": ["client/src", "server/src"],
"exclude": [
"**/node_modules/**",
"**/*.test.*",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see client/test in the coverage report. I guess we should exclude it.

"client/dist",
"client/src/connection/rest/api",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are files auto-generated by OpenAPI

"server/dist",
"tools",
"server/src/python"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

server/src/python is copied from node_modules as part of the build process

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry this directory looks not copied from node_modules to me. where did you see the copy?

],
"reporter": ["html", "text"],
"excludeAfterRemap": true,
"checkCoverage": true,
"lines": 52,
"statements": 52,
"branches": 71,
"functions": 43
Comment on lines +15 to +19
Copy link
Contributor Author

@scottdover scottdover Aug 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about adding minimum levels now just to make sure things don't get worse (the numbers above are right below the current values), with the eventual goal being having code coverage at 80%.

And, do we care about these individual numbers, or do we really only care about lines (I'm inclined to believe this should probably only be "lines": 80)?

Last, is 80% code coverage reasonable in an open source repository, or would that be asking too much from contributors?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would vote to not fail the build until we're fully ready. I guess we're not setting up testing infrastructure to the webviews. So if lines added in webviews and make the numbers worse it's not straightforward to fix.

}
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- run: npm ci
- run: npm run format:check
- run: npm run copyright:check
- run: xvfb-run -a npm run test
- run: xvfb-run -a npm run coverage
if: runner.os == 'Linux'
- run: npx @vscode/vsce package
- uses: actions/upload-artifact@v4
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ node_modules
*.node
*.qps-ploc.json
l10n/bundle.l10n.json
.history
.history
coverage/
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=https://registry.npmjs.org
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ server/**/*.json

# VSCode history
.history/

coverage/
4 changes: 3 additions & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ ContributorAgreement.txt
.nvmrc
eslint.config.mjs
pull_request_template.md
l10n/bundle.l10n.json
l10n/bundle.l10n.json
.c8rc
coverage/
187 changes: 187 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1387,6 +1387,7 @@
"test-client": "node ./client/out/test/runTest.js",
"test-server": "cross-env TS_NODE_PROJECT=./server/tsconfig.json mocha -r ts-node/register ./server/test/**/*.test.ts",
"test": "npm run test-server && npm run test-client",
"coverage": "c8 --clean npm run test",
"pseudoLocalize": "npx @vscode/l10n-dev export -o ./l10n ./client/src && npx @vscode/l10n-dev generate-pseudo -o ./l10n/ ./l10n/bundle.l10n.json ./package.nls.json",
"postinstall": "cd client && npm install && cd ../server && npm install && cd ..",
"copyright:check": "node ./tools/check-copyright.mjs",
Expand All @@ -1403,6 +1404,7 @@
"@typescript-eslint/parser": "^8.32.1",
"@vscode/l10n-dev": "^0.0.35",
"buffer": "6.0.3",
"c8": "^10.1.3",
"chai": "^4.4.1",
"concurrently": "^9.1.2",
"cross-env": "^10.0.0",
Expand Down
Loading