Commit c23daa00 authored by smartcontracts's avatar smartcontracts Committed by GitHub

maint(ci): apply expectRevert rule to tests (#12543)

Updates semgrep config to apply expectRevert to tests. Fixes a few
instances where this wasn't being followed.
parent 5f2cc843
...@@ -105,7 +105,7 @@ contract ETHLiquidity_Test is CommonTest { ...@@ -105,7 +105,7 @@ contract ETHLiquidity_Test is CommonTest {
uint256 amount = STARTING_LIQUIDITY_BALANCE + 1; uint256 amount = STARTING_LIQUIDITY_BALANCE + 1;
// Act // Act
vm.expectRevert(); vm.expectRevert(); // nosemgrep: sol-safety-expectrevert-no-args
ethLiquidity.mint(amount); ethLiquidity.mint(amount);
// Assert // Assert
......
...@@ -314,7 +314,7 @@ contract SuperchainWETH_Test is CommonTest { ...@@ -314,7 +314,7 @@ contract SuperchainWETH_Test is CommonTest {
superchainWeth.deposit{ value: _amount }(); superchainWeth.deposit{ value: _amount }();
// Act // Act
vm.expectRevert(); vm.expectRevert(); // nosemgrep: sol-safety-expectrevert-no-args
superchainWeth.crosschainBurn(_from, _amount + 1); superchainWeth.crosschainBurn(_from, _amount + 1);
} }
......
...@@ -351,7 +351,7 @@ contract MerkleTrie_get_Test is Test { ...@@ -351,7 +351,7 @@ contract MerkleTrie_get_Test is Test {
// Ambiguous revert check- all that we care is that it *does* fail. This case may // Ambiguous revert check- all that we care is that it *does* fail. This case may
// fail within different branches. // fail within different branches.
vm.expectRevert(); vm.expectRevert(); // nosemgrep: sol-safety-expectrevert-no-args
MerkleTrie.get(key, proof, root); MerkleTrie.get(key, proof, root);
} }
......
...@@ -37,7 +37,7 @@ rules: ...@@ -37,7 +37,7 @@ rules:
- pattern: vm.expectRevert() - pattern: vm.expectRevert()
paths: paths:
exclude: exclude:
- packages/contracts-bedrock/test - packages/contracts-bedrock/test/dispute/WETH98.t.sol
- id: sol-style-input-arg-fmt - id: sol-style-input-arg-fmt
languages: [solidity] languages: [solidity]
...@@ -80,7 +80,6 @@ rules: ...@@ -80,7 +80,6 @@ rules:
exclude: exclude:
- packages/contracts-bedrock/test/safe-tools/CompatibilityFallbackHandler_1_3_0.sol - packages/contracts-bedrock/test/safe-tools/CompatibilityFallbackHandler_1_3_0.sol
- id: sol-style-malformed-require - id: sol-style-malformed-require
languages: [solidity] languages: [solidity]
severity: ERROR severity: ERROR
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment