-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(exitCodeUsage): Report direct cases
Closes #218
- Loading branch information
Showing
5 changed files
with
131 additions
and
38 deletions.
There are no files selected for viewing
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
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
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
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 |
---|---|---|
@@ -1,19 +1,39 @@ | ||
[HIGH] ExitCodeUsage: Value is outside allowed range | ||
test/detectors/ExitCodeUsage.tact:14:28: | ||
13 | // Bad | ||
> 14 | nativeThrowUnless(128, sender() == self.owner); | ||
^ | ||
15 | | ||
Exit codes 0-255 are reserved. Used value: 128 | ||
Help: Use a value between 256 and 65535 | ||
See: https://nowarp.io/tools/misti/docs/detectors/ExitCodeUsage | ||
|
||
[HIGH] ExitCodeUsage: Value is outside allowed range | ||
test/detectors/ExitCodeUsage.tact:17:28: | ||
16 | // Bad | ||
> 17 | nativeThrowUnless(255, sender() == self.owner); | ||
^ | ||
18 | | ||
Exit codes 0-255 are reserved. Used value: 255 | ||
Help: Use a value between 256 and 65535 | ||
See: https://nowarp.io/tools/misti/docs/detectors/ExitCodeUsage | ||
|
||
[HIGH] ExitCodeUsage: Exit code variable "code1" has value outside allowed range | ||
test/detectors/ExitCodeUsage.tact:15:28: | ||
14 | let code1: Int = 128; | ||
> 15 | nativeThrowUnless(code1, sender() == self.owner); | ||
test/detectors/ExitCodeUsage.tact:21:28: | ||
20 | let code1: Int = 128; | ||
> 21 | nativeThrowUnless(code1, sender() == self.owner); | ||
^ | ||
16 | | ||
22 | | ||
Exit codes 0-255 are reserved. Variable value: 128 | ||
Help: Use a value between 256 and 65535 | ||
See: https://nowarp.io/tools/misti/docs/detectors/ExitCodeUsage | ||
|
||
[HIGH] ExitCodeUsage: Exit code variable "code2" has value outside allowed range | ||
test/detectors/ExitCodeUsage.tact:20:28: | ||
19 | code2 = code2 - 10; | ||
> 20 | nativeThrowUnless(code2, sender() == self.owner); | ||
test/detectors/ExitCodeUsage.tact:26:28: | ||
25 | code2 = code2 - 10; | ||
> 26 | nativeThrowUnless(code2, sender() == self.owner); | ||
^ | ||
21 | | ||
27 | | ||
Exit codes 0-255 are reserved. Variable value: 246 | ||
Help: Use a value between 256 and 65535 | ||
See: https://nowarp.io/tools/misti/docs/detectors/ExitCodeUsage |
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