-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a274e14
commit b8a1cb8
Showing
5 changed files
with
397 additions
and
0 deletions.
There are no files selected for viewing
226 changes: 226 additions & 0 deletions
226
linters/pyright/test_data/pyright_v1.1.359_basic.check.shot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,226 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
// trunk-upgrade-validation:RELEASE | ||
|
||
exports[`Testing linter pyright test basic 1`] = ` | ||
{ | ||
"issues": [ | ||
{ | ||
"code": "reportAttributeAccessIssue", | ||
"column": "57", | ||
"file": "test_data/basic.in.py", | ||
"issueClass": "ISSUE_CLASS_EXISTING", | ||
"issueUrl": "https://github.com/microsoft/pyright/blob/main/docs/configuration.md#reportAttributeAccessIssue", | ||
"level": "LEVEL_HIGH", | ||
"line": "1", | ||
"linter": "pyright", | ||
"message": ""Enum" is unknown import symbol", | ||
"ranges": [ | ||
{ | ||
"filePath": "test_data/basic.in.py", | ||
"length": "4", | ||
"offset": "56", | ||
}, | ||
], | ||
"targetType": "python", | ||
}, | ||
{ | ||
"column": "13", | ||
"file": "test_data/basic.in.py", | ||
"issueClass": "ISSUE_CLASS_EXISTING", | ||
"issueUrl": "https://github.com/microsoft/pyright/blob/main/docs/configuration.md#", | ||
"level": "LEVEL_LOW", | ||
"line": "15", | ||
"linter": "pyright", | ||
"message": "Type of "a.x" is "int | str"", | ||
"ranges": [ | ||
{ | ||
"filePath": "test_data/basic.in.py", | ||
"length": "3", | ||
"offset": "384", | ||
}, | ||
], | ||
"targetType": "python", | ||
}, | ||
{ | ||
"code": "reportAttributeAccessIssue", | ||
"column": "3", | ||
"file": "test_data/basic.in.py", | ||
"issueClass": "ISSUE_CLASS_EXISTING", | ||
"issueUrl": "https://github.com/microsoft/pyright/blob/main/docs/configuration.md#reportAttributeAccessIssue", | ||
"level": "LEVEL_HIGH", | ||
"line": "18", | ||
"linter": "pyright", | ||
"message": "Cannot assign to attribute "x" for class "A" | ||
Expression of type "float" cannot be assigned to attribute "x" of class "A" | ||
Type "float" is incompatible with type "int | str" | ||
"float" is incompatible with "int" | ||
"float" is incompatible with "str"", | ||
"ranges": [ | ||
{ | ||
"filePath": "test_data/basic.in.py", | ||
"length": "1", | ||
"offset": "462", | ||
}, | ||
], | ||
"targetType": "python", | ||
}, | ||
{ | ||
"code": "reportUndefinedVariable", | ||
"column": "8", | ||
"file": "test_data/basic.in.py", | ||
"issueClass": "ISSUE_CLASS_EXISTING", | ||
"issueUrl": "https://github.com/microsoft/pyright/blob/main/docs/configuration.md#reportUndefinedVariable", | ||
"level": "LEVEL_HIGH", | ||
"line": "24", | ||
"linter": "pyright", | ||
"message": ""ClassVar" is not defined", | ||
"ranges": [ | ||
{ | ||
"filePath": "test_data/basic.in.py", | ||
"length": "8", | ||
"offset": "602", | ||
}, | ||
], | ||
"targetType": "python", | ||
}, | ||
{ | ||
"code": "reportAttributeAccessIssue", | ||
"column": "9", | ||
"file": "test_data/basic.in.py", | ||
"issueClass": "ISSUE_CLASS_EXISTING", | ||
"issueUrl": "https://github.com/microsoft/pyright/blob/main/docs/configuration.md#reportAttributeAccessIssue", | ||
"level": "LEVEL_HIGH", | ||
"line": "31", | ||
"linter": "pyright", | ||
"message": "Cannot access attribute "z" for class "type[A]" | ||
Attribute "z" is unknown", | ||
"ranges": [ | ||
{ | ||
"filePath": "test_data/basic.in.py", | ||
"length": "1", | ||
"offset": "742", | ||
}, | ||
], | ||
"targetType": "python", | ||
}, | ||
{ | ||
"code": "reportReturnType", | ||
"column": "29", | ||
"file": "test_data/basic.in.py", | ||
"issueClass": "ISSUE_CLASS_EXISTING", | ||
"issueUrl": "https://github.com/microsoft/pyright/blob/main/docs/configuration.md#reportReturnType", | ||
"level": "LEVEL_HIGH", | ||
"line": "39", | ||
"linter": "pyright", | ||
"message": "Function with declared return type "bool" must return value on all code paths | ||
"None" is incompatible with "bool"", | ||
"ranges": [ | ||
{ | ||
"filePath": "test_data/basic.in.py", | ||
"length": "4", | ||
"offset": "864", | ||
}, | ||
], | ||
"targetType": "python", | ||
}, | ||
{ | ||
"code": "reportReturnType", | ||
"column": "12", | ||
"file": "test_data/basic.in.py", | ||
"issueClass": "ISSUE_CLASS_EXISTING", | ||
"issueUrl": "https://github.com/microsoft/pyright/blob/main/docs/configuration.md#reportReturnType", | ||
"level": "LEVEL_HIGH", | ||
"line": "5", | ||
"linter": "pyright", | ||
"message": "Expression of type "int" is incompatible with return type "str" | ||
"int" is incompatible with "str"", | ||
"ranges": [ | ||
{ | ||
"filePath": "test_data/basic.in.py", | ||
"length": "1", | ||
"offset": "105", | ||
}, | ||
], | ||
"targetType": "python", | ||
}, | ||
{ | ||
"column": "25", | ||
"file": "test_data/basic.in.py", | ||
"issueClass": "ISSUE_CLASS_EXISTING", | ||
"issueUrl": "https://github.com/microsoft/pyright/blob/main/docs/configuration.md#", | ||
"level": "LEVEL_LOW", | ||
"line": "51", | ||
"linter": "pyright", | ||
"message": "Type of "val" is "int"", | ||
"ranges": [ | ||
{ | ||
"filePath": "test_data/basic.in.py", | ||
"length": "3", | ||
"offset": "1128", | ||
}, | ||
], | ||
"targetType": "python", | ||
}, | ||
{ | ||
"column": "39", | ||
"file": "test_data/basic.in.py", | ||
"issueClass": "ISSUE_CLASS_EXISTING", | ||
"issueUrl": "https://github.com/microsoft/pyright/blob/main/docs/configuration.md#", | ||
"level": "LEVEL_LOW", | ||
"line": "54", | ||
"linter": "pyright", | ||
"message": "Type of "val" is "int"", | ||
"ranges": [ | ||
{ | ||
"filePath": "test_data/basic.in.py", | ||
"length": "3", | ||
"offset": "1244", | ||
}, | ||
], | ||
"targetType": "python", | ||
}, | ||
{ | ||
"code": "reportRedeclaration", | ||
"column": "7", | ||
"file": "test_data/basic.in.py", | ||
"issueClass": "ISSUE_CLASS_EXISTING", | ||
"issueUrl": "https://github.com/microsoft/pyright/blob/main/docs/configuration.md#reportRedeclaration", | ||
"level": "LEVEL_HIGH", | ||
"line": "7", | ||
"linter": "pyright", | ||
"message": "Class declaration "A" is obscured by a declaration of the same name", | ||
"ranges": [ | ||
{ | ||
"filePath": "test_data/basic.in.py", | ||
"length": "1", | ||
"offset": "183", | ||
}, | ||
], | ||
"targetType": "python", | ||
}, | ||
], | ||
"lintActions": [ | ||
{ | ||
"command": "lint", | ||
"fileGroupName": "python", | ||
"linter": "pyright", | ||
"paths": [ | ||
"test_data/basic.in.py", | ||
], | ||
"verb": "TRUNK_VERB_CHECK", | ||
}, | ||
{ | ||
"command": "lint", | ||
"fileGroupName": "python", | ||
"linter": "pyright", | ||
"paths": [ | ||
"test_data/basic.in.py", | ||
], | ||
"upstream": true, | ||
"verb": "TRUNK_VERB_CHECK", | ||
}, | ||
], | ||
"taskFailures": [], | ||
"unformattedFiles": [], | ||
} | ||
`; |
43 changes: 43 additions & 0 deletions
43
linters/trufflehog/test_data/trufflehog_git_v3.73.0_CUSTOM.check.shot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
// trunk-upgrade-validation:RELEASE | ||
|
||
exports[`Testing linter trufflehog-git test CUSTOM 1`] = ` | ||
{ | ||
"issues": [ | ||
{ | ||
"code": "URI", | ||
"file": ".", | ||
"isSecurity": true, | ||
"issueClass": "ISSUE_CLASS_NEW", | ||
"level": "LEVEL_HIGH", | ||
"linter": "trufflehog-git", | ||
"message": "secrets.in.py:8: Secret detected: https://admin:********@the-internet.herokuapp.com on commit <hash> (file since deleted)", | ||
"targetType": "ALL", | ||
}, | ||
{ | ||
"code": "URI", | ||
"file": "secrets2.in.py", | ||
"isSecurity": true, | ||
"issueClass": "ISSUE_CLASS_NEW", | ||
"level": "LEVEL_HIGH", | ||
"line": "8", | ||
"linter": "trufflehog-git", | ||
"message": "Secret detected: https://admin:********@the-internet.herokuapp.com on commit <hash>", | ||
"targetType": "ALL", | ||
}, | ||
], | ||
"lintActions": [ | ||
{ | ||
"command": "lint", | ||
"fileGroupName": "ALL", | ||
"linter": "trufflehog-git", | ||
"paths": [ | ||
".", | ||
], | ||
"verb": "TRUNK_VERB_CHECK", | ||
}, | ||
], | ||
"taskFailures": [], | ||
"unformattedFiles": [], | ||
} | ||
`; |
31 changes: 31 additions & 0 deletions
31
linters/trufflehog/test_data/trufflehog_v3.73.0_buff_size.check.shot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
// trunk-upgrade-validation:RELEASE | ||
|
||
exports[`Testing linter trufflehog test buff_size 1`] = ` | ||
{ | ||
"issues": [], | ||
"lintActions": [ | ||
{ | ||
"command": "lint", | ||
"fileGroupName": "ALL", | ||
"linter": "trufflehog", | ||
"paths": [ | ||
"test_data/buff_size.in.cc", | ||
], | ||
"verb": "TRUNK_VERB_CHECK", | ||
}, | ||
{ | ||
"command": "lint", | ||
"fileGroupName": "ALL", | ||
"linter": "trufflehog", | ||
"paths": [ | ||
"test_data/buff_size.in.cc", | ||
], | ||
"upstream": true, | ||
"verb": "TRUNK_VERB_CHECK", | ||
}, | ||
], | ||
"taskFailures": [], | ||
"unformattedFiles": [], | ||
} | ||
`; |
43 changes: 43 additions & 0 deletions
43
linters/trufflehog/test_data/trufflehog_v3.73.0_secrets.check.shot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
// trunk-upgrade-validation:RELEASE | ||
|
||
exports[`Testing linter trufflehog test secrets 1`] = ` | ||
{ | ||
"issues": [ | ||
{ | ||
"code": "URI", | ||
"file": "test_data/secrets.in.py", | ||
"isSecurity": true, | ||
"issueClass": "ISSUE_CLASS_EXISTING", | ||
"level": "LEVEL_HIGH", | ||
"line": "8", | ||
"linter": "trufflehog", | ||
"message": "Secret detected: https://admin:********@the-internet.herokuapp.com", | ||
"targetType": "ALL", | ||
}, | ||
], | ||
"lintActions": [ | ||
{ | ||
"command": "lint", | ||
"fileGroupName": "ALL", | ||
"linter": "trufflehog", | ||
"paths": [ | ||
"test_data/secrets.in.py", | ||
], | ||
"verb": "TRUNK_VERB_CHECK", | ||
}, | ||
{ | ||
"command": "lint", | ||
"fileGroupName": "ALL", | ||
"linter": "trufflehog", | ||
"paths": [ | ||
"test_data/secrets.in.py", | ||
], | ||
"upstream": true, | ||
"verb": "TRUNK_VERB_CHECK", | ||
}, | ||
], | ||
"taskFailures": [], | ||
"unformattedFiles": [], | ||
} | ||
`; |
Oops, something went wrong.