Skip to content

Commit

Permalink
add formatting rules
Browse files Browse the repository at this point in the history
  • Loading branch information
gretzke committed Jul 2, 2024
1 parent 7cae6d0 commit 5fc63e3
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
5 changes: 4 additions & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ optimizer_runs = 200
fuzz.runs = 100

[fmt]
line_length = 160
line_length = 120
tab_width = 4
quote_style = "single"
sort_imports = true
number_underscore = "thousands"

[rpc_endpoints]
Expand Down
4 changes: 2 additions & 2 deletions script/Deploy.s.sol
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.26;

import "forge-std/Script.sol";
import 'forge-std/Script.sol';

import {Counter} from "src/Counter.sol";
import {Counter} from 'src/Counter.sol';

contract Deploy is Script {
using stdJson for string;
Expand Down
2 changes: 1 addition & 1 deletion src/Counter.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.26;

import {ICounter} from "./interface/ICounter.sol";
import {ICounter} from './interface/ICounter.sol';

contract Counter is ICounter {
uint256 public number;
Expand Down
12 changes: 6 additions & 6 deletions test/Counter.t.sol
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.26;

import "forge-std/Test.sol";
import "test/util/TestHelpers.sol";
import {GasSnapshot} from "forge-gas-snapshot/GasSnapshot.sol";
import {GasSnapshot} from 'forge-gas-snapshot/GasSnapshot.sol';
import 'forge-std/Test.sol';
import 'test/util/TestHelpers.sol';

import {Counter} from "src/Counter.sol";
import {Counter} from 'src/Counter.sol';

abstract contract Deployed is Test, TestHelpers {
Counter counter;
Expand All @@ -23,7 +23,7 @@ contract CounterTest_Deployed is Deployed, GasSnapshot {

function test_IncrementsNumber() public {
counter.increment();
snapLastCall("Increment counter number");
snapLastCall('Increment counter number');
assertEq(counter.number(), 11);
}

Expand All @@ -35,6 +35,6 @@ contract CounterTest_Deployed is Deployed, GasSnapshot {
function test_SetNumber_gas() public {
uint256 x = 100;
counter.setNumber(x);
snapLastCall("Set counter number");
snapLastCall('Set counter number');
}
}
6 changes: 3 additions & 3 deletions test/util/TestHelpers.sol
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.26;

import "forge-std/Test.sol";
import 'forge-std/Test.sol';

abstract contract TestHelpers is Test {
Account internal DEPLOYER;

constructor() {
DEPLOYER = makeAccount("DEPLOYER");
vm.setEnv("PRIVATE_KEY", vm.toString(DEPLOYER.key));
DEPLOYER = makeAccount('DEPLOYER');
vm.setEnv('PRIVATE_KEY', vm.toString(DEPLOYER.key));
}
}

0 comments on commit 5fc63e3

Please sign in to comment.