Skip to content

Commit bacb2d1

Browse files
committed
fix(scripts): handle unset _ats_wrapper variable and fix lint warnings in coverage-report.js
Signed-off-by: Marcos Serradilla Diez <marcos@io.builders>
1 parent 98f84a0 commit bacb2d1

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

packages/ats/contracts/scripts/coverage-report.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515
* Defaults to ./coverage.json in the current working directory.
1616
*/
1717

18+
/* eslint-disable @typescript-eslint/no-require-imports */
1819
const fs = require("fs");
1920
const path = require("path");
2021
const { execSync } = require("child_process");
22+
/* eslint-enable @typescript-eslint/no-require-imports */
2123

2224
// ── ANSI ─────────────────────────────────────────────────────────────────────
2325
const R = "\x1b[0m";
@@ -177,7 +179,7 @@ try {
177179
.map((line) => path.resolve(gitRoot, line.slice(3).trim()));
178180

179181
pendingEntries = allEntries.filter((e) => pendingPaths.includes(e.fullPath));
180-
} catch (_) {
182+
} catch {
181183
// not a git repo or git unavailable
182184
}
183185

packages/ats/contracts/scripts/run-ai-checks.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ if ! $SKIP_COVERAGE && $ALL_OK; then
815815
# Build the coverage command respecting --test-file and --test-grep.
816816
# --testfiles filters files; TEST_GREP is passed via env var (read by hardhat.config.ts).
817817
COVERAGE_CMD=(npx hardhat coverage)
818-
if [[ -n "$_ats_wrapper" ]]; then
818+
if [[ -n "${_ats_wrapper:-}" ]]; then
819819
COVERAGE_CMD+=(--testfiles "$_ats_wrapper")
820820
elif [[ -n "$TEST_FILE" ]]; then
821821
COVERAGE_CMD+=(--testfiles "$TEST_FILE")

0 commit comments

Comments
 (0)