Skip to content

Commit

Permalink
feat: add sort imports true on forge fmt (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xDiscotech authored Jan 4, 2024
1 parent ef09c01 commit ee25b3f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion solidity/contracts/Greeter.sol
Original file line number Diff line number Diff line change
@@ -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 {
/**
Expand Down
2 changes: 1 addition & 1 deletion solidity/scripts/Deploy.sol
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
5 changes: 2 additions & 3 deletions solidity/test/integration/IntegrationBase.sol
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 2 additions & 2 deletions solidity/test/unit/Greeter.t.sol
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: MIT
pragma solidity =0.8.19;

Check warning on line 2 in solidity/test/unit/Greeter.t.sol

View workflow job for this annotation

GitHub Actions / Lint Commit Messages

Found more than One contract per file. 4 contracts found!

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');
Expand Down

0 comments on commit ee25b3f

Please sign in to comment.