From 4acf6e8d7ec7b3b054c71632376c70ad592247e9 Mon Sep 17 00:00:00 2001 From: Alex Roan Date: Thu, 26 Oct 2023 11:57:52 +0100 Subject: [PATCH] Report location output --- report.md | 16 ++++++++-------- src/lib.rs | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/report.md b/report.md index e5b19cf61..4f349d72b 100644 --- a/report.md +++ b/report.md @@ -64,9 +64,9 @@ https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.s Use `abi.encode()` instead which will pad items to 32 bytes, which will [prevent hash collisions](https://docs.soliditylang.org/en/v0.8.13/abi-spec.html#non-standard-packed-mode) (e.g. `abi.encodePacked(0x123,0x456)` => `0x123456` => `abi.encodePacked(0x1,0x23456)`, but `abi.encode(0x123,0x456)` => `0x0...1230...456`). Unless there is a compelling reason, `abi.encode` should be preferred. If there is only one argument to `abi.encodePacked()` it can often be cast to `bytes()` or `bytes32()` [instead](https://ethereum.stackexchange.com/questions/30912/how-to-compare-strings-in-solidity#answer-82739). If all arguments are strings and or bytes, `bytes.concat()` should be used instead. -- Found in src/KeccakContract.sol: 584:16:42 -- Found in src/KeccakContract.sol: 731:16:42 - Found in src/KeccakContract.sol: 878:16:42 +- Found in src/KeccakContract.sol: 731:16:42 +- Found in src/KeccakContract.sol: 584:16:42 @@ -92,10 +92,10 @@ Openzeppelin has deprecated several functions and replaced with newer versions. ERC20 functions may not behave as expected. For example: return values are not always meaningful. It is recommended to use OpenZeppelin's SafeERC20 library. - Found in src/DeprecatedOZFunctions.sol: 1062:13:38 -- Found in src/DeprecatedOZFunctions.sol: 1598:18:38 - Found in src/DeprecatedOZFunctions.sol: 1322:13:38 -- Found in src/DeprecatedOZFunctions.sol: 1424:13:38 - Found in src/DeprecatedOZFunctions.sol: 1272:13:38 +- Found in src/DeprecatedOZFunctions.sol: 1598:18:38 +- Found in src/DeprecatedOZFunctions.sol: 1424:13:38 @@ -104,8 +104,8 @@ ERC20 functions may not behave as expected. For example: return values are not a Consider using a specific version of Solidity in your contracts instead of a wide version. For example, instead of `pragma solidity ^0.8.0;`, use `pragma solidity 0.8.0;` - Found in src/InheritanceBase.sol: 32:23:41 -- Found in src/Counter.sol: 39:24:37 - Found in src/IContractInheritance.sol: 32:24:40 +- Found in src/Counter.sol: 39:24:37 # NC Issues @@ -123,14 +123,14 @@ Assigning values to address state variables without checking for `address(0)`. +- Found in src/Counter.sol: 120:80:37 - Found in src/StateVariables.sol: 2063:79:43 -- Found in src/StateVariables.sol: 2148:346:43 -- Found in src/StateVariables.sol: 1426:292:43 - Found in src/StateVariables.sol: 2500:376:43 -- Found in src/Counter.sol: 120:80:37 - Found in src/AdminContract.sol: 302:26:36 - Found in src/StateVariables.sol: 1906:151:43 +- Found in src/StateVariables.sol: 2148:346:43 - Found in src/StateVariables.sol: 1755:145:43 +- Found in src/StateVariables.sol: 1426:292:43 diff --git a/src/lib.rs b/src/lib.rs index d0873b235..0650699b9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -63,6 +63,7 @@ pub fn run(context_loader: ContextLoader) -> Result<(), Box> { let printer = MarkdownReportPrinter; printer.print_report(get_markdown_writer("report.md")?, &report, &context_loader)?; + println!("Report printed to ./report.md"); Ok(()) }