Skip to content
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

chore(githooks): add pre-commit script to sync solc version #36

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

3esmit
Copy link

@3esmit 3esmit commented Sep 13, 2024

Description

This commit adds a new pre-commit script called "pre-commit-solc-sync" to the githooks directory. The script is responsible for extracting the solc version from the "foundry.toml" file and updating the ".vscode/settings.json" file with the extracted version. If the "solidity.compileUsingRemoteVersion" key already exists in the settings file, the script updates the version. Otherwise, it modifies the last key, adds the new key, and closes the JSON object. Finally, the updated settings file is added to the commit.

The purpose of this change is to automate the synchronization of the solc version used for Solidity compilation in the project everywhere else its also need to be configured configured.

See juanfranblanco/vscode-solidity#463

Checklist

Ensure you completed all of the steps below before submitting your pull request:

  • Added natspec comments?
  • Ran pnpm adorno?
  • Ran pnpm verify?

This commit adds a new pre-commit script called "pre-commit-solc-sync" to the githooks directory. The script is responsible for extracting the solc version from the "foundry.toml" file and updating the ".vscode/settings.json" file with the extracted version. If the "solidity.compileUsingRemoteVersion" key already exists in the settings file, the script updates the version. Otherwise, it modifies the last key, adds the new key, and closes the JSON object. Finally, the updated settings file is added to the commit.

The purpose of this change is to automate the synchronization of the solc version used for Solidity compilation in the project everywhere else its also need to be configured configured.

See juanfranblanco/vscode-solidity#463
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs Review
Development

Successfully merging this pull request may close these issues.

1 participant