From e9c7e1cbc42dfef69757618c2cd4cfa5505532e5 Mon Sep 17 00:00:00 2001 From: "rehearsal[bot]" <> Date: Fri, 28 Oct 2022 00:35:04 +0000 Subject: [PATCH] "chore(rehearsal): compatibility for upcoming TypeScript 4.9.1" --- test/.rehearsal/report.json | 90 ++++++++++++++++++++++++ test/.rehearsal/report.sarif | 130 +++++++++++++++++++++++++++++++++++ test/test.ts | 1 + 3 files changed, 221 insertions(+) create mode 100644 test/.rehearsal/report.json create mode 100644 test/.rehearsal/report.sarif diff --git a/test/.rehearsal/report.json b/test/.rehearsal/report.json new file mode 100644 index 0000000..a7e70a0 --- /dev/null +++ b/test/.rehearsal/report.json @@ -0,0 +1,90 @@ +{ + "summary": { + "projectName": "@rehearsal/action", + "tsVersion": "4.9.1-beta", + "timestamp": "2022-10-28T00:35:04.460Z", + "basePath": "/home/runner/work/action/action/test", + "uniqueErrors": 1, + "totalErrors": 2, + "totalErrorsList": { + "6133": 2 + }, + "fixedErrors": 1, + "fixedErrorsList": { + "6133": 1 + }, + "files": 1, + "filesList": [ + "/test.ts" + ] + }, + "items": [ + { + "analysisTarget": "/home/runner/work/action/action/test/test.ts", + "files": { + "/home/runner/work/action/action/test/test.ts": { + "fileName": "/home/runner/work/action/action/test/test.ts", + "location": { + "line": 2, + "character": 9 + }, + "fixed": true, + "code": " b", + "codeFixAction": "delete", + "hintAdded": false, + "roles": [ + "analysisTarget", + "modified" + ] + } + }, + "errorCode": 6133, + "category": "Error", + "message": "'b' is declared but its value is never read.", + "hint": "The variable 'b' is never read or used. Remove the variable or use it.", + "fixed": true, + "nodeKind": "Identifier", + "nodeText": "b", + "helpUrl": "https://stackoverflow.com/search?tab=votes&q=TS6133", + "nodeLocation": { + "start": 29, + "length": 1, + "line": 1, + "character": 8 + } + }, + { + "analysisTarget": "/home/runner/work/action/action/test/test.ts", + "files": { + "/home/runner/work/action/action/test/test.ts": { + "fileName": "/home/runner/work/action/action/test/test.ts", + "location": { + "line": 2, + "character": 11 + }, + "fixed": false, + "hint": "The variable 'b' is never read or used. Remove the variable or use it.", + "hintAdded": true, + "roles": [ + "analysisTarget", + "unmodified" + ] + } + }, + "errorCode": 6133, + "category": "Error", + "message": "'b' is declared but its value is never read.", + "hint": "The variable 'b' is never read or used. Remove the variable or use it.", + "fixed": false, + "nodeKind": "Identifier", + "nodeText": "b", + "helpUrl": "https://stackoverflow.com/search?tab=votes&q=TS6133", + "nodeLocation": { + "start": 31, + "length": 1, + "line": 1, + "character": 10 + } + } + ] +} \ No newline at end of file diff --git a/test/.rehearsal/report.sarif b/test/.rehearsal/report.sarif new file mode 100644 index 0000000..b1b7040 --- /dev/null +++ b/test/.rehearsal/report.sarif @@ -0,0 +1,130 @@ +{ + "version": "2.1.0", + "$schema": "http://json.schemastore.org/sarif-2.1.0-rtm.4", + "runs": [ + { + "tool": { + "driver": { + "name": "@rehearsal/upgrade", + "informationUri": "https://github.com/rehearsal-js/rehearsal-js", + "rules": [ + { + "id": "TS6133", + "name": "TS6133", + "shortDescription": { + "text": "'b' is declared but its value is never read." + }, + "helpUri": "" + } + ] + } + }, + "artifacts": [ + { + "location": { + "uri": "/home/runner/work/action/action/test/test.ts" + }, + "roles": [ + "analysisTarget", + "modified" + ], + "properties": { + "fixed": true, + "hintAdded": true + } + } + ], + "results": [ + { + "ruleId": "TS6133", + "ruleIndex": 0, + "level": "error", + "baselineState": "updated", + "kind": "review", + "message": { + "text": "The variable 'b' is never read or used. Remove the variable or use it." + }, + "analysisTarget": { + "uri": "/home/runner/work/action/action/test/test.ts" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "/home/runner/work/action/action/test/test.ts", + "index": 0 + }, + "region": { + "startLine": 2, + "startColumn": 9 + }, + "properties": { + "code": " b", + "codeFixAction": "delete", + "roles": [ + "analysisTarget", + "modified" + ] + } + } + } + ], + "relatedLocations": [], + "properties": { + "fixed": true, + "fixes": [ + { + "fileName": "/home/runner/work/action/action/test/test.ts", + "code": " b", + "codeFixAction": "delete" + } + ] + } + }, + { + "ruleId": "TS6133", + "ruleIndex": 0, + "level": "error", + "baselineState": "unchanged", + "kind": "informational", + "message": { + "text": "The variable 'b' is never read or used. Remove the variable or use it." + }, + "analysisTarget": { + "uri": "/home/runner/work/action/action/test/test.ts" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "/home/runner/work/action/action/test/test.ts", + "index": 0 + }, + "region": { + "startLine": 2, + "startColumn": 11 + }, + "properties": { + "roles": [ + "analysisTarget", + "unmodified" + ] + } + } + } + ], + "relatedLocations": [], + "properties": { + "fixed": false, + "fixes": [] + } + } + ], + "automationDetails": { + "description": { + "text": "This is the run of @rehearsal/upgrade on your product against TypeScript 4.9.1-beta at 2022-10-28T00:35:04.460Z" + } + } + } + ] +} \ No newline at end of file diff --git a/test/test.ts b/test/test.ts index bad8bcb..e85cc5d 100644 --- a/test/test.ts +++ b/test/test.ts @@ -1,3 +1,4 @@ function a(): void { + /* @ts-ignore @rehearsal TODO TS6133: The variable 'b' is never read or used. Remove the variable or use it. */ const b = 'a'; }