Skip to content

Commit 91a69e1

Browse files
zerosnacksMerkleBoy
authored andcommitted
fix(forge lint): add URI (e.g. tokenURI from ERC721 / ERC6909) as exception to mixed-case-function (foundry-rs#11533)
* add URI (e.g. tokenURI from ERC721 / ERC6909) as exception * fix test
1 parent a8ce825 commit 91a69e1

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

crates/config/src/lint.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ pub struct LinterConfig {
2828

2929
/// Configurable patterns that should be excluded when performing `mixedCase` lint checks.
3030
///
31-
/// Default's to ["ERC"] to allow common names like `rescueERC20` or `ERC721TokenReceiver`.
31+
/// Default's to ["ERC", "URI"] to allow common names like `rescueERC20`, `ERC721TokenReceiver`
32+
/// or `tokenURI`.
3233
pub mixed_case_exceptions: Vec<String>,
3334
}
3435

@@ -39,7 +40,7 @@ impl Default for LinterConfig {
3940
severity: Vec::new(),
4041
exclude_lints: Vec::new(),
4142
ignore: Vec::new(),
42-
mixed_case_exceptions: vec!["ERC".to_string()],
43+
mixed_case_exceptions: vec!["ERC".to_string(), "URI".to_string()],
4344
}
4445
}
4546
}

crates/forge/tests/cli/config.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,7 +1081,10 @@ severity = []
10811081
exclude_lints = []
10821082
ignore = []
10831083
lint_on_build = true
1084-
mixed_case_exceptions = ["ERC"]
1084+
mixed_case_exceptions = [
1085+
"ERC",
1086+
"URI",
1087+
]
10851088
10861089
[doc]
10871090
out = "docs"
@@ -1308,7 +1311,8 @@ exclude = []
13081311
"ignore": [],
13091312
"lint_on_build": true,
13101313
"mixed_case_exceptions": [
1311-
"ERC"
1314+
"ERC",
1315+
"URI"
13121316
]
13131317
},
13141318
"doc": {

0 commit comments

Comments
 (0)