File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change 1
1
import { parse , GrammarItem } from '@aivenio/tsc-output-parser' ;
2
2
import { Issue } from 'codeclimate-types' ;
3
+ import { createHash } from "node:crypto" ;
3
4
4
5
export default function format ( input : string ) : Issue [ ] {
5
6
const foo : GrammarItem [ ] = parse ( input ) ;
@@ -11,6 +12,7 @@ export default function format (input: string): Issue[] {
11
12
check_name : inputItem . value . tsError . value . errorString ,
12
13
description : inputItem . value . message . value ,
13
14
severity : 'major' ,
15
+ fingerprint : createHash ( "sha256" ) . update ( inputItem . value . path . value + ":" + inputItem . value . tsError . value . errorString ) . digest ( "hex" ) ,
14
16
location : {
15
17
path : inputItem . value . path . value ,
16
18
positions : {
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ describe("format", () => {
10
10
] ,
11
11
"check_name" : "TS7006" ,
12
12
"description" : " Parameter 'node' implicitly has an 'any' type.\n" ,
13
+ "fingerprint" : "20066f3363e75e58f37a5d94dc4b2e833e31166d7be38fa3e3e13788ff644747" ,
13
14
"location" : {
14
15
"path" : "node_modules/example/example.d.ts" ,
15
16
"positions" : {
@@ -32,6 +33,7 @@ describe("format", () => {
32
33
] ,
33
34
"check_name" : "TS7006" ,
34
35
"description" : " Parameter 'node' implicitly has an 'any' type.\n" ,
36
+ "fingerprint" : "e76aa9fe395c5050ed3cc53bb4ee5d12c3d15afadb361a436a8db8bd1f42670e" ,
35
37
"location" : {
36
38
"path" : "example/example.d.ts" ,
37
39
"positions" : {
You can’t perform that action at this time.
0 commit comments