We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have the following file:
// SPDX-License-Identifier: MIT pragma solidity 0.8.2; abstract contract Foo { modifier bar() virtual; }
When I format it with hardhat-vscode, the formatter removes the semicolon after the modifier:
hardhat-vscode
// SPDX-License-Identifier: MIT pragma solidity 0.8.2; abstract contract Foo { - modifier bar() virtual; + modifier bar() virtual }
which results in invalid solidity code.
The issue seems to disappear when the modifier gets a default implementation:
// SPDX-License-Identifier: MIT pragma solidity 0.8.2; abstract contract Foo { modifier bar() virtual { _; } }
The text was updated successfully, but these errors were encountered:
I have been able to reproduce the example via the hardhat-vscode format call.
When I run the on the same input via prettier-plugin-solidity which we use for formatting under the hood, we don't get this issue.
prettier-plugin-solidity
The next step is to debug and figure out why formatting via the plugin gives a different result than via prettier at the cli.
Sorry, something went wrong.
Released as part of v0.5.0
v0.5.0
Thank you! 🙇
No branches or pull requests
I have the following file:
When I format it with
hardhat-vscode
, the formatter removes the semicolon after the modifier:which results in invalid solidity code.
The issue seems to disappear when the modifier gets a default implementation:
The text was updated successfully, but these errors were encountered: