diff --git a/.github/workflows/status.yml b/.github/workflows/status.yml index 33f4e990..c32c91f0 100644 --- a/.github/workflows/status.yml +++ b/.github/workflows/status.yml @@ -33,7 +33,7 @@ jobs: id: status_check run: | # Run status checks, Remove ANSI colors from the text - output=$(node ./status-checks | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g') + output=$(ts-node ./status-checks/index.ts | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g') # Escape newlines so _all_ the output is included in the set-output output="${output//'%'/'%25'}" output="${output//$'\n'/'%0A'}" diff --git a/status-checks/check.ts b/status-checks/check.ts index d902906b..d0b2322d 100644 --- a/status-checks/check.ts +++ b/status-checks/check.ts @@ -92,7 +92,7 @@ const checkEvents = async (connector: { const eventsPath = `${connector.path}/events.sol`; const mainPath = `${connector.path}/main.sol`; if (connector.events.length) { - const eventNames: any[] = []; + const eventNames:string[] = []; for (let i1 = 0; i1 < connector.mainEvents.length; i1++) { const mainEvent = connector.mainEvents[i1]; const name = mainEvent.split("(")[0]; @@ -196,7 +196,7 @@ const parseCode = async (connector: { path: any; code?: any }) => { let funcs = []; let event: string[] = []; let mainEvents: string[] = []; - let firstLine: number = 0; + let firstLine: number = -1; let mainEventsLines = []; for (let index = 0; index < strs.length; index++) { const str = strs[index]; @@ -297,7 +297,7 @@ const parseCode = async (connector: { path: any; code?: any }) => { } }; -const checkComments = async (connector: { funcs: string | any[]; path: any; }) => { +const checkComments = async (connector:any) => { try { const errors = []; for (let i1 = 0; i1 < connector.funcs.length; i1++) {