File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -1847,3 +1847,20 @@ contract Counter {
18471847 assert_eq!( "true" , enabled. unwrap( ) . to_string( ) ) ;
18481848 assert_eq!( "800" , runs. unwrap( ) . to_string( ) ) ;
18491849} ) ;
1850+
1851+ // <https://github.com/foundry-rs/foundry/issues/11227>
1852+ forgetest_init ! ( test_exclude_lints_config, |prj, cmd| {
1853+ prj. update_config( |config| {
1854+ config. lint. exclude_lints = vec![
1855+ "asm-keccak256" . to_string( ) ,
1856+ "incorrect-shift" . to_string( ) ,
1857+ "divide-before-multiply" . to_string( ) ,
1858+ "mixed-case-variable" . to_string( ) ,
1859+ "mixed-case-function" . to_string( ) ,
1860+ "screaming-snake-case-const" . to_string( ) ,
1861+ "screaming-snake-case-immutable" . to_string( ) ,
1862+ "unwrapped-modifier-logic" . to_string( ) ,
1863+ ]
1864+ } ) ;
1865+ cmd. args( [ "lint" ] ) . assert_success( ) . stdout_eq( str ![ "" ] ) ;
1866+ } ) ;
Original file line number Diff line number Diff line change @@ -370,6 +370,12 @@ impl<'a> TryFrom<&'a str> for SolLint {
370370 }
371371 }
372372
373+ for & lint in codesize:: REGISTERED_LINTS {
374+ if lint. id ( ) == value {
375+ return Ok ( lint) ;
376+ }
377+ }
378+
373379 Err ( SolLintError :: InvalidId ( value. to_string ( ) ) )
374380 }
375381}
You can’t perform that action at this time.
0 commit comments