Invalid memory-safe assembly detector#
Name: invalid-memory-safe-assembly
Reports usage of @solidity memory-safe-assembly
in non-NatSpec comments. The Solidity compiler only recognizes memory-safe assembly annotations when they are written in NatSpec format (///
or /** */
). Regular comments (//
or /* */
) containing this annotation are ignored by the compiler.
Example#
- Invalid: Regular
//
comment is ignored by the compiler - Invalid: Regular
/* */
comment is ignored by the compiler - Valid: NatSpec
///
comment is recognized by the compiler - Valid: NatSpec
/** */
comment is recognized by the compiler
Parameters#
The detector does not accept any additional parameters.