openzeppelin-contracts
openzeppelin-contracts copied to clipboard
Ignore specific warnings and make the rest into errors
Fixes #3686
- Ignores code size warnings if we're compiling without optimizations.
- Ignores unreachable code warnings caused by files in
contracts/mocks/unreachable. - Ignores unused parameter warnings that are emitted during coverage analysis (I guess because of coverage transforms).
- Promote the rest of the warnings into errors.
- Makes the revert in ERC721Enumerable._beforeConsecutiveTransfer conditional on the batch size in order to remove the warning about unreachable code that otherwise users will see when they combine with other modules like ERC721Pausable.
Changed the file naming convention as suggested. Still only applies to contracts under contracts/mocks/ because we want to see the warning for the production contracts.