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

Add solana checks to make file #407

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Add solana checks to make file #407

wants to merge 8 commits into from

Conversation

agusaldasoro
Copy link
Contributor

@agusaldasoro agusaldasoro commented Dec 26, 2024

The Solana Contracts have many validations regarding format and autogenerated code, this new make command needs to be run only when a file under chains/solana was modified and auto fix style issues, and auto generates all needed files.

@winder
Copy link
Contributor

winder commented Dec 26, 2024

Could you put this in a make target? Something like "make solana_checks". The pre commit config would call the target (and maybe do the yubi key thing).

We could also call that target as part of CI to ensure these files are always consistent. Add a call to the new target here:

- name: ensure no changes

@agusaldasoro agusaldasoro requested a review from a team as a code owner December 30, 2024 20:04
@agusaldasoro
Copy link
Contributor Author

Could you put this in a make target? Something like "make solana_checks". The pre commit config would call the target (and maybe do the yubi key thing).

We could also call that target as part of CI to ensure these files are always consistent. Add a call to the new target here:

- name: ensure no changes

All Solana Validations are run in https://github.com/smartcontractkit/chainlink-ccip/blob/feat/add-docs/.github/workflows/solana.yml

The pre-commit hook is just for local dev

@agusaldasoro agusaldasoro requested a review from toblich January 2, 2025 18:55
@agusaldasoro agusaldasoro changed the title Add pre commit hook Add solana checks to make file Jan 2, 2025
Copy link

github-actions bot commented Jan 2, 2025

Metric feat/add-docs main
Coverage 76.5% 76.4%

cd ./contracts && anchor build

.PHONY: solana-checks
solana-checks: clippy anchor-go-gen format gomodtidy lint-go rust-tests go-tests build-contracts
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The anchor-go-gen is already building the contracts, could you please remove that redundancy to bring down the time it takes to run this command?

Suggested change
solana-checks: clippy anchor-go-gen format gomodtidy lint-go rust-tests go-tests build-contracts
solana-checks: clippy anchor-go-gen format gomodtidy lint-go rust-tests go-tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I needed it to recreate the IDL, as the tests modify them adding the program_ids

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants