Skip to content

Commit

Permalink
Add a test for issue 53
Browse files Browse the repository at this point in the history
  • Loading branch information
louischan-oursky committed Sep 9, 2024
1 parent b7aa36b commit 06771b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/__snapshots__/test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ src/simple.ts:12:5: 'b' is assigned a value but never used. Allowed unused vars
src/simple.ts:12:11: Unexpected number value in conditional. An explicit zero/NaN check is required. [Error/@typescript-eslint/strict-boolean-expressions]
src/simple.ts:14:8: Function 'thisFunctionIsHardToComprehend' has a complexity of 14. Maximum allowed is 10. [Error/complexity]
src/simple.ts:14:17: Refactor this function to reduce its Cognitive Complexity from 19 to the 10 allowed. [Error/sonarjs/cognitive-complexity]
src/simple.ts:55:25: 'unused' is defined but never used. Allowed unused args must match /^_/u. [Error/@typescript-eslint/no-unused-vars]
9 problems"
10 problems"
`;
4 changes: 4 additions & 0 deletions test/src/simple.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,7 @@ export function issue43(a: "A" | "B"): number {
return 2;
}
}

export function issue53(unused: number): number {
return 0;
}

0 comments on commit 06771b0

Please sign in to comment.