Skip to content

dubzn/pre-commit-cairo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Pre-commit Hooks for Cairo

Enhance your Cairo development workflow with the pre-commit toolset.

Integrating Cairo Tools with pre-commit

  1. Begin by installing pre-commit using pip (refer to pre-commit documentation if needed).
pip install pre-commit
  1. Create a .pre-commit-config.yaml file in the root of your project.

  2. Populate your pre-commit configuration with the desired hooks:

repos:
    - repo: https://github.com/dubzn/pre-commit-cairo.git
      rev: v0.1.4
      hooks:
          - id: scarb-fmt
            args: [--check] # This argument is optional, you can remove '--check' to apply scarb fmt directly
          - id: scarb-test  
            args: []
            # include other hooks   

Note: The available hooks for version v0.1.4 are:

# Scarb

# Format code using Scarb.
- id: scarb-fmt

# Run Scarb tests to ensure the reliability of the Cairo project.
- id: scarb-test

# Use Scarb to execute the build process for the Cairo project.
- id: scarb-build

# Foundry

# Run Foundry tests to ensure the reliability of the Cairo project.
- id: foundry-test
  1. Install pre-commit config.
pre-commit install
  1. Enjoy the streamlined development process! 🎉

Make sure you have the dependencies installed according to your project:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published