File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -679,6 +679,9 @@ impl Config {
679679 /// TOML section for profiles
680680 pub const PROFILE_SECTION : & ' static str = "profile" ;
681681
682+ /// External config sections, ignored from warnings.
683+ pub const EXTERNAL_SECTION : & ' static str = "external" ;
684+
682685 /// Standalone sections in the config which get integrated into the selected profile
683686 pub const STANDALONE_SECTIONS : & ' static [ & ' static str ] = & [
684687 "rpc_endpoints" ,
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ impl<P: Provider> WarningsProvider<P> {
4848 data. keys ( )
4949 . filter ( |k| {
5050 * * k != Config :: PROFILE_SECTION
51+ && * * k != Config :: EXTERNAL_SECTION
5152 && !Config :: STANDALONE_SECTIONS . iter ( ) . any ( |s| s == k)
5253 } )
5354 . map ( |unknown_section| {
Original file line number Diff line number Diff line change @@ -1924,3 +1924,24 @@ Warning: Key `deny_warnings` is being deprecated in favor of `deny = warnings`.
19241924
19251925"# ] ] ) ;
19261926} ) ;
1927+
1928+ // <https://github.com/foundry-rs/foundry/issues/5866>
1929+ forgetest ! ( no_warnings_on_external_sections, |prj, cmd| {
1930+ cmd. git_init( ) ;
1931+
1932+ let toml = r"[profile.default]
1933+ src = 'src'
1934+ out = 'out'
1935+
1936+ # Custom sections for other tools
1937+ [external.scopelint]
1938+ some_flag = 1
1939+
1940+ [external.forge_deploy]
1941+ another_setting = 123" ;
1942+
1943+ fs:: write( prj. root( ) . join( "foundry.toml" ) , toml) . unwrap( ) ;
1944+ cmd. forge_fuse( ) . args( [ "config" ] ) . assert_success( ) . stderr_eq( str ![ [ r#"
1945+
1946+ "# ] ] ) ;
1947+ } ) ;
You can’t perform that action at this time.
0 commit comments