Skip to content

pre-commit hook has tests commented out — add a flag to enable them and document it in scripts/README.md #342

@Austinaminu2

Description

@Austinaminu2

Summary

The scripts/pre-commit hook has the test step commented out:

# Run tests (optional - can be slow for large projects)
# Uncomment the following lines if you want to run tests before each commit:
# echo "Running tests..."
# if ! cargo test --workspace; then

Contributors who want pre-commit test validation must manually edit the script. There is no documented way to enable this. The scripts/README.md also does not mention the test step exists or how to enable it.

Tasks

  • Add a FORGE_PRECOMMIT_TESTS environment variable flag: if set to 1, tests run; otherwise skipped
  • Update the pre-commit script to check ${FORGE_PRECOMMIT_TESTS:-0}
  • Update scripts/README.md to document the flag and how to enable it
  • Update CONTRIBUTING.md to reference the flag
  • Add a tip suggesting FORGE_PRECOMMIT_TESTS=1 git commit for contributors adding new tests

Labels: dx, good first issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave program

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions