Closed adjicf closed 4 years ago
Hey @adjicf, thanks for opening this.
This plugin only works as glue between solhint and prettier-solidity. Could you please open an issue in prettier-solidity?
Actually, I think there are two bugs, so maybe you should open two different issues:
returns
should be at the endDone, thank you very much.
Function type declaration are rewritten incorrectly and when ignoring them and adding some comments there is another extra error.
The original code:
The rewrite:
When ignoring it:
The error: contracts/Broken.sol: Error: Comment "This gives an error" was not printed. Please report this error! [error] at astComments.forEach.comment (...../contracts/node_modules/prettier/index.js:14273:13) [error] at Array.forEach ()
[error] at Object.ensureAllCommentsPrinted (contracts/node_modules/prettier/index.js:14271:15)
[error] at coreFormat (...../contracts/node_modules/prettier/index.js:14858:12)
[error] at format (...../contracts/node_modules/prettier/index.js:15063:14)
[error] at formatWithCursor (...../contracts/node_modules/prettier/index.js:15080:12)
[error] at Object.args [as formatWithCursor] (...../contracts/node_modules/prettier/index.js:54658:12)
[error] at format (...../contracts/node_modules/prettier/bin-prettier.js:15851:14)
[error] at Object.formatFiles (...../contracts/node_modules/prettier/bin-prettier.js:16035:16)
[error] at Object.run (...../contracts/node_modules/prettier/bin-prettier.js:16508:14)