PR #397 #1186
codeql
on: dynamic
Matrix: analyze
Annotations
1 error and 4 warnings
|
Import uses '.ts' extension inconsistent with project convention and may break tsup build:
src/utils/xcodebuild-domain-results.ts#L31
Line 31 imports from './xcresult-test-failures.ts' while every other import in this file (and the project's Node16 ESM convention) uses the '.js' extension. The project compiles via tsup with `module: Node16` and produces a `build/cli.js` shipped to users. Mixing a '.ts' specifier into shipped source may break the built output's module resolution at runtime and is at minimum inconsistent with the rest of the codebase, risking breakage for downstream consumers.
|
|
Analyze (actions)
Starting April 2026, the CodeQL Action will skip computing file coverage information on pull requests to improve analysis performance. File coverage information will still be computed on non-PR analyses.
To opt out of this change, create a custom repository property with the name `github-codeql-file-coverage-on-prs` and the type "True/false", then set this property to `true` in the repository's settings.
|
|
`xcresult` test uses `/tmp/...` paths that the tmpdir normalizer rewrites on Linux hosts:
src/snapshot-tests/__tests__/json-normalize.test.ts#L47
The new test asserts `normalizeStructuredEnvelope(envelope)` equals the input envelope verbatim while embedding `buildLogPath: '/tmp/build.log'` and `xcresultPath: '/tmp/App Tests.xcresult'`. `normalizeString` calls `normalizeSnapshotOutput`, which replaces `os.tmpdir() + '/<name>'` with `<TMPDIR>`. On Linux CI (where `os.tmpdir()` is `/tmp`), `/tmp/build.log` becomes `<TMPDIR>` and `/tmp/App Tests.xcresult` becomes `<TMPDIR> Tests.xcresult`, so the equality fails. On macOS (`/var/folders/.../T`) the literal `/tmp/...` does not match and the test passes. This makes the guardrail platform-dependent and undermines the intended assertion that xcresult paths are preserved through normalization.
|
|
Import uses .ts extension instead of .js:
src/utils/xcodebuild-domain-results.ts#L31
The new import for `extractTestSummaryCountsFromXcresult` uses a `.ts` extension, while every other import in this file (and per project ES module standards shown in surrounding code) uses `.js`. This is inconsistent with project standards for ES module imports and will likely fail at runtime since TypeScript ES module resolution expects `.js` extensions.
|
|
Success summary reports non-zero failed count, contradicting SUCCEEDED status:
src/utils/renderers/event-formatting.ts#L514
When `event.status === 'SUCCEEDED'`, the summary now includes `${failed} failed` in the output. By definition a SUCCEEDED run should have zero failures, so either this branch will always print `0 failed` (noisy and redundant) or, if the status can be SUCCEEDED while `failedTests > 0`, it produces a self-contradictory message like `✅ 5 tests passed, 2 failed, 0 skipped`. Users reading test output will see misleading or confusing summaries.
|