-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
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
forge fmt
does not always respect project's Foundry config
#456
Comments
@PaulRBerg thanks for feedback. Does the "losing the connectiowith the foundry config", happen immediately on opening the project in vscode or is it that it works correctly initially but then there is some point during editing that it starts failing? |
The second scenario - works correctly initially, but it then drifts away. |
@PaulRBerg hey there! I've investigated this issue and can't find where or how this is happening. The formatting process is pretty straightforward. To help troubleshoot it, I've submitted a PR that adds a bit of logging to the formatting process, so when it happens you could set the logging to verbose and we may be able to spot the source of the problem. The PR is #465 |
Interestingly enough, this problem stopped happening on my end. I will tentatively close the issue in the meantime, but if it happens again I will follow your guidance and set the logging to verbose 👍 |
I keep bumping into the bug that should have been fixed by #316.
Hardhat VSCode does not always pick up my
[fmt]
configuration infoundry.toml
:In particular, it does not consistently follow the
bracket_spacing
rule, e.g. this:Turns into this:
The bug is transitory, though. When I open the file again and save it, the fmt rules are picked up correctly,
I cannot pinpoint the root cause, but this happens very often - basically every day. Might there be a race condition somewhere in Hardhat VSCode?
For context, these are my VSCode settings:
This happens in all of my repos, but for a particular example, you can take a look at PRBProxy.
The text was updated successfully, but these errors were encountered: