From ee25b3ffefe94f90233309f75fe2df333c6c8fcc Mon Sep 17 00:00:00 2001 From: Disco <131301107+0xDiscotech@users.noreply.github.com> Date: Thu, 4 Jan 2024 15:00:02 +0100 Subject: [PATCH] feat: add sort imports true on forge fmt (#44) --- foundry.toml | 1 + solidity/contracts/Greeter.sol | 2 +- solidity/scripts/Deploy.sol | 2 +- solidity/test/integration/IntegrationBase.sol | 5 ++--- solidity/test/unit/Greeter.t.sol | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/foundry.toml b/foundry.toml index 849e3529..d3d0bd20 100644 --- a/foundry.toml +++ b/foundry.toml @@ -6,6 +6,7 @@ int_types = 'long' quote_style = 'single' number_underscore = 'thousands' multiline_func_header = 'params_first' +sort_imports = true [profile.default] solc_version = '0.8.19' diff --git a/solidity/contracts/Greeter.sol b/solidity/contracts/Greeter.sol index 4143dae4..3c517ae1 100644 --- a/solidity/contracts/Greeter.sol +++ b/solidity/contracts/Greeter.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity =0.8.19; -import {IERC20} from 'isolmate/interfaces/tokens/IERC20.sol'; import {IGreeter} from 'interfaces/IGreeter.sol'; +import {IERC20} from 'isolmate/interfaces/tokens/IERC20.sol'; contract Greeter is IGreeter { /** diff --git a/solidity/scripts/Deploy.sol b/solidity/scripts/Deploy.sol index 2f7a1e06..629ac029 100644 --- a/solidity/scripts/Deploy.sol +++ b/solidity/scripts/Deploy.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity =0.8.19; -import {Script} from 'forge-std/Script.sol'; import {Greeter} from 'contracts/Greeter.sol'; +import {Script} from 'forge-std/Script.sol'; import {IERC20} from 'isolmate/interfaces/tokens/IERC20.sol'; abstract contract Deploy is Script { diff --git a/solidity/test/integration/IntegrationBase.sol b/solidity/test/integration/IntegrationBase.sol index add7d81f..656d1e0b 100644 --- a/solidity/test/integration/IntegrationBase.sol +++ b/solidity/test/integration/IntegrationBase.sol @@ -1,10 +1,9 @@ // SPDX-License-Identifier: MIT pragma solidity =0.8.19; -import {IERC20} from 'isolmate/interfaces/tokens/IERC20.sol'; -import {Test} from 'forge-std/Test.sol'; - import {Greeter, IGreeter} from 'contracts/Greeter.sol'; +import {Test} from 'forge-std/Test.sol'; +import {IERC20} from 'isolmate/interfaces/tokens/IERC20.sol'; contract IntegrationBase is Test { uint256 internal constant _FORK_BLOCK = 18_920_905; diff --git a/solidity/test/unit/Greeter.t.sol b/solidity/test/unit/Greeter.t.sol index 42e328bd..c2f51b29 100644 --- a/solidity/test/unit/Greeter.t.sol +++ b/solidity/test/unit/Greeter.t.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: MIT pragma solidity =0.8.19; -import {IERC20} from 'isolmate/interfaces/tokens/IERC20.sol'; -import {Test} from 'forge-std/Test.sol'; import {Greeter, IGreeter} from 'contracts/Greeter.sol'; +import {Test} from 'forge-std/Test.sol'; +import {IERC20} from 'isolmate/interfaces/tokens/IERC20.sol'; abstract contract Base is Test { address internal _owner = makeAddr('owner');