Commit 8636b6e2 authored by smartcontracts's avatar smartcontracts Committed by GitHub

feat: add sol-style-doc-comment locally (#12343)

Adds the sol-style-doc-comment semgrep rule locally. Fixes one
instance that was caught by the rule.
parent f9a30526
...@@ -17,3 +17,9 @@ rules: ...@@ -17,3 +17,9 @@ rules:
severity: ERROR severity: ERROR
languages: languages:
- solidity - solidity
- id: sol-style-doc-comment
languages: [solidity]
severity: ERROR
message: Javadoc-style comments are not allowed, use `///` style doc comments instead
pattern-regex: (\/\*\*\n(\s+\*\s.*\n)+\s+\*\/)
...@@ -26,12 +26,10 @@ library SafeSigners { ...@@ -26,12 +26,10 @@ library SafeSigners {
let signaturePos := mul(0x41, _pos) let signaturePos := mul(0x41, _pos)
r_ := mload(add(_signatures, add(signaturePos, 0x20))) r_ := mload(add(_signatures, add(signaturePos, 0x20)))
s_ := mload(add(_signatures, add(signaturePos, 0x40))) s_ := mload(add(_signatures, add(signaturePos, 0x40)))
/** // Here we are loading the last 32 bytes, including 31 bytes
* Here we are loading the last 32 bytes, including 31 bytes // of 's'. There is no 'mload8' to do this.
* of 's'. There is no 'mload8' to do this. // 'byte' is not working due to the Solidity parser, so lets
* 'byte' is not working due to the Solidity parser, so lets // use the second best option, 'and'
* use the second best option, 'and'
*/
v_ := and(mload(add(_signatures, add(signaturePos, 0x41))), 0xff) v_ := and(mload(add(_signatures, add(signaturePos, 0x41))), 0xff)
} }
} }
......
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