openzeppelin-contracts icon indicating copy to clipboard operation
openzeppelin-contracts copied to clipboard

Ignore specific warnings and make the rest into errors

Open frangio opened this issue 3 years ago • 1 comments

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.

frangio avatar Sep 09 '22 22:09 frangio

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.

frangio avatar Sep 20 '22 23:09 frangio