forked from foundry-rs/foundry
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(fmt): variable override spacing option (foundry-rs#3524)
- Loading branch information
Showing
5 changed files
with
84 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// config: line_length = 40 | ||
// config: variable_override_spacing = false | ||
contract Contract { | ||
bytes32 private constant BYTES; | ||
bytes32 | ||
private | ||
constant | ||
override(Base1) BYTES; | ||
bytes32 | ||
private | ||
constant | ||
override(Base1, Base2) BYTES; | ||
bytes32 | ||
private | ||
constant | ||
immutable | ||
override BYTES; | ||
bytes32 | ||
private | ||
constant | ||
immutable | ||
override | ||
BYTES_VERY_VERY_VERY_LONG; | ||
bytes32 | ||
private | ||
constant | ||
override( | ||
Base1, | ||
Base2, | ||
SomeLongBaseContract, | ||
AndAnotherVeryLongBaseContract, | ||
Imported.Contract | ||
) BYTES_OVERRIDDEN; | ||
|
||
bytes32 private constant BYTES = | ||
0x035aff83d86937d35b32e04f0ddc6ff469290eef2f1b692d8a815c89404d4749; | ||
bytes32 | ||
private | ||
constant | ||
immutable | ||
override BYTES = | ||
0x035aff83d86937d35b32e04f0ddc6ff469290eef2f1b692d8a815c89404d4749; | ||
bytes32 | ||
private | ||
constant | ||
immutable | ||
override | ||
BYTES_VERY_VERY_VERY_LONG = | ||
0x035aff83d86937d35b32e04f0ddc6ff469290eef2f1b692d8a815c89404d4749; | ||
bytes32 private constant | ||
BYTES_VERY_VERY_LONG = | ||
0x035aff83d86937d35b32e04f0ddc6ff469290eef2f1b692d8a815c89404d4749; | ||
|
||
uint256 constant POWER_EXPRESSION = | ||
10 ** 27; | ||
uint256 constant ADDED_EXPRESSION = | ||
1 + 2; | ||
|
||
// comment 1 | ||
uint256 constant example1 = 1; | ||
// comment 2 | ||
// comment 3 | ||
uint256 constant example2 = 2; // comment 4 | ||
uint256 constant example3 = /* comment 5 */ | ||
3; // comment 6 | ||
} |