Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Should add pre-commits to validate the code quality #4

Closed
yanCode opened this issue Feb 14, 2025 · 1 comment
Closed

Should add pre-commits to validate the code quality #4

yanCode opened this issue Feb 14, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@yanCode
Copy link
Owner

yanCode commented Feb 14, 2025

As there is node.js env in solana anchor project. husk & lint-staged can be direcly applied.

Each time when submitting a commit, this command will be automatically executed before the commit. (lint & prettier can be added for typescript/javascript)

"lint-staged": {
    "programs/**/*.rs": "cargo fmt && cargo clippy --fix --allow-dirty"
  },
@yanCode yanCode added the enhancement New feature or request label Feb 14, 2025
@yanCode
Copy link
Owner Author

yanCode commented Feb 14, 2025

explanation of lint-staged can be seen here: https://github.com/lint-staged/lint-staged

@yanCode yanCode reopened this Feb 14, 2025
@yanCode yanCode closed this as completed Feb 14, 2025
yanCode added a commit that referenced this issue Feb 14, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant