Remove unused imports with solhint plus extra rules (#5661)
This commit is contained in:
@ -3,7 +3,6 @@
|
||||
|
||||
pragma solidity ^0.8.20;
|
||||
|
||||
import {IAuthority} from "./IAuthority.sol";
|
||||
import {AuthorityUtils} from "./AuthorityUtils.sol";
|
||||
import {IAccessManager} from "./IAccessManager.sol";
|
||||
import {IAccessManaged} from "./IAccessManaged.sol";
|
||||
|
||||
@ -3,8 +3,6 @@
|
||||
|
||||
pragma solidity ^0.8.20;
|
||||
|
||||
import {Time} from "../../utils/types/Time.sol";
|
||||
|
||||
interface IAccessManager {
|
||||
/**
|
||||
* @dev A delayed operation was scheduled.
|
||||
|
||||
@ -3,8 +3,6 @@
|
||||
pragma solidity ^0.8.20;
|
||||
|
||||
import {Governor} from "../Governor.sol";
|
||||
import {SafeCast} from "../../utils/math/SafeCast.sol";
|
||||
import {Checkpoints} from "../../utils/structs/Checkpoints.sol";
|
||||
|
||||
/**
|
||||
* @dev Extension of {Governor} with a super quorum. Proposals that meet the super quorum (and have a majority of for
|
||||
|
||||
@ -5,7 +5,6 @@ pragma solidity ^0.8.20;
|
||||
|
||||
import {IGovernor, Governor} from "../Governor.sol";
|
||||
import {TimelockController} from "../TimelockController.sol";
|
||||
import {IERC165} from "../../interfaces/IERC165.sol";
|
||||
import {SafeCast} from "../../utils/math/SafeCast.sol";
|
||||
|
||||
/**
|
||||
|
||||
@ -6,7 +6,6 @@ pragma solidity ^0.8.20;
|
||||
import {Governor} from "../Governor.sol";
|
||||
import {IVotes} from "../utils/IVotes.sol";
|
||||
import {IERC5805} from "../../interfaces/IERC5805.sol";
|
||||
import {SafeCast} from "../../utils/math/SafeCast.sol";
|
||||
import {Time} from "../../utils/types/Time.sol";
|
||||
|
||||
/**
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
pragma solidity ^0.8.20;
|
||||
|
||||
import {AccessManager} from "../access/manager/AccessManager.sol";
|
||||
import {StorageSlot} from "../utils/StorageSlot.sol";
|
||||
|
||||
contract AccessManagerMock is AccessManager {
|
||||
event CalledRestricted(address caller);
|
||||
|
||||
@ -1,14 +1,13 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity ^0.8.20;
|
||||
|
||||
import {IGovernor, Governor} from "../../../governance/Governor.sol";
|
||||
import {Governor} from "../../../governance/Governor.sol";
|
||||
import {GovernorCountingSimple} from "../../../governance/extensions/GovernorCountingSimple.sol";
|
||||
import {GovernorVotes} from "../../../governance/extensions/GovernorVotes.sol";
|
||||
import {GovernorVotesQuorumFraction} from "../../../governance/extensions/GovernorVotesQuorumFraction.sol";
|
||||
import {GovernorTimelockControl} from "../../../governance/extensions/GovernorTimelockControl.sol";
|
||||
import {TimelockController} from "../../../governance/TimelockController.sol";
|
||||
import {IVotes} from "../../../governance/utils/IVotes.sol";
|
||||
import {IERC165} from "../../../interfaces/IERC165.sol";
|
||||
|
||||
contract MyGovernor is
|
||||
Governor,
|
||||
|
||||
@ -5,7 +5,7 @@ pragma solidity ^0.8.20;
|
||||
import {Governor} from "../../governance/Governor.sol";
|
||||
import {GovernorSettings} from "../../governance/extensions/GovernorSettings.sol";
|
||||
import {GovernorVotesQuorumFraction} from "../../governance/extensions/GovernorVotesQuorumFraction.sol";
|
||||
import {GovernorCountingOverridable, VotesExtended} from "../../governance/extensions/GovernorCountingOverridable.sol";
|
||||
import {GovernorCountingOverridable} from "../../governance/extensions/GovernorCountingOverridable.sol";
|
||||
|
||||
abstract contract GovernorCountingOverridableMock is
|
||||
GovernorSettings,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
pragma solidity ^0.8.20;
|
||||
|
||||
import {IGovernor, Governor} from "../../governance/Governor.sol";
|
||||
import {Governor} from "../../governance/Governor.sol";
|
||||
import {GovernorTimelockControl} from "../../governance/extensions/GovernorTimelockControl.sol";
|
||||
import {GovernorSettings} from "../../governance/extensions/GovernorSettings.sol";
|
||||
import {GovernorCountingSimple} from "../../governance/extensions/GovernorCountingSimple.sol";
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
pragma solidity ^0.8.20;
|
||||
|
||||
import {IGovernor, Governor} from "../../governance/Governor.sol";
|
||||
import {Governor} from "../../governance/Governor.sol";
|
||||
import {GovernorTimelockAccess} from "../../governance/extensions/GovernorTimelockAccess.sol";
|
||||
import {GovernorSettings} from "../../governance/extensions/GovernorSettings.sol";
|
||||
import {GovernorCountingSimple} from "../../governance/extensions/GovernorCountingSimple.sol";
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
pragma solidity ^0.8.20;
|
||||
|
||||
import {IGovernor, Governor} from "../../governance/Governor.sol";
|
||||
import {Governor} from "../../governance/Governor.sol";
|
||||
import {GovernorTimelockCompound} from "../../governance/extensions/GovernorTimelockCompound.sol";
|
||||
import {GovernorSettings} from "../../governance/extensions/GovernorSettings.sol";
|
||||
import {GovernorCountingSimple} from "../../governance/extensions/GovernorCountingSimple.sol";
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
pragma solidity ^0.8.20;
|
||||
|
||||
import {IGovernor, Governor} from "../../governance/Governor.sol";
|
||||
import {Governor} from "../../governance/Governor.sol";
|
||||
import {GovernorTimelockControl} from "../../governance/extensions/GovernorTimelockControl.sol";
|
||||
import {GovernorSettings} from "../../governance/extensions/GovernorSettings.sol";
|
||||
import {GovernorCountingSimple} from "../../governance/extensions/GovernorCountingSimple.sol";
|
||||
|
||||
@ -2,8 +2,7 @@
|
||||
|
||||
pragma solidity ^0.8.20;
|
||||
|
||||
import {IERC20} from "../../interfaces/IERC20.sol";
|
||||
import {ERC20, ERC1363} from "../../token/ERC20/extensions/ERC1363.sol";
|
||||
import {ERC1363} from "../../token/ERC20/extensions/ERC1363.sol";
|
||||
|
||||
// contract that replicate USDT approval behavior in approveAndCall
|
||||
abstract contract ERC1363ForceApproveMock is ERC1363 {
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
|
||||
pragma solidity ^0.8.20;
|
||||
|
||||
import {IERC20, ERC20} from "../../token/ERC20/ERC20.sol";
|
||||
import {ERC1363} from "../../token/ERC20/extensions/ERC1363.sol";
|
||||
|
||||
abstract contract ERC1363NoReturnMock is ERC1363 {
|
||||
|
||||
@ -5,6 +5,7 @@ const rules = [
|
||||
'const-name-snakecase',
|
||||
'contract-name-capwords',
|
||||
'event-name-capwords',
|
||||
'max-states-count',
|
||||
'explicit-types',
|
||||
'func-name-mixedcase',
|
||||
'func-param-name-mixedcase',
|
||||
@ -17,6 +18,8 @@ const rules = [
|
||||
'use-forbidden-name',
|
||||
'var-name-mixedcase',
|
||||
'visibility-modifier-order',
|
||||
'interface-starts-with-i',
|
||||
'duplicated-imports',
|
||||
...customRules.map(r => `openzeppelin/${r.ruleId}`),
|
||||
];
|
||||
|
||||
|
||||
@ -5,7 +5,6 @@ pragma solidity ^0.8.20;
|
||||
import {Test} from "forge-std/Test.sol";
|
||||
|
||||
import {P256} from "@openzeppelin/contracts/utils/cryptography/P256.sol";
|
||||
import {Math} from "@openzeppelin/contracts/utils/math/Math.sol";
|
||||
import {Errors} from "@openzeppelin/contracts/utils/Errors.sol";
|
||||
|
||||
contract P256Test is Test {
|
||||
|
||||
Reference in New Issue
Block a user