Skip to content

Commit

Permalink
chore: fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Apr 23, 2024
1 parent f6259df commit 74454cb
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ async function run() {
try {
// Upload the gates report to be used as a reference in later runs.
await uploadArtifact();
} catch (error: any) {
return core.setFailed(error.message);
} catch (error) {
return core.setFailed((error as Error).message);
}

// cannot use artifactClient because downloads are limited to uploads in the same workflow run
Expand Down Expand Up @@ -88,15 +88,15 @@ async function run() {
archive_format: "zip",
});

const zip = new Zip(Buffer.from(res.data as any));
const zip = new Zip(Buffer.from(res.data as ArrayBuffer));
for (const entry of zip.getEntries()) {
core.info(`Loading gas reports from "${entry.entryName}"`);
referenceContent = zip.readAsText(entry);
}
core.endGroup();
} else core.error(`No workflow run found with an artifact named "${baseReport}"`);
} catch (error: any) {
return core.setFailed(error.message);
} catch (error) {
return core.setFailed((error as Error).message);
}
}

Expand All @@ -113,10 +113,7 @@ async function run() {
core.endGroup();

core.startGroup("Compute gas diff");
const diffRows = computeProgramDiffs(
referenceReports.programs[0].functions,
compareReports.programs[0].functions
);
const diffRows = computeProgramDiffs(referenceReports.programs, compareReports.programs);

Check failure on line 116 in src/index.ts

View workflow job for this annotation

GitHub Actions / check-dist

Argument of type 'ProgramReport[]' is not assignable to parameter of type 'CircuitReport[]'.
core.info(`Format markdown of ${diffRows.length} diffs`);
const markdown = formatMarkdownDiff(
header,
Expand All @@ -136,8 +133,8 @@ async function run() {
core.setOutput("shell", shell);
core.setOutput("markdown", markdown);
}
} catch (error: any) {
core.setFailed(error.message);
} catch (error) {
core.setFailed((error as Error).message);
}
}

Expand Down

0 comments on commit 74454cb

Please sign in to comment.