Skip to content

☑️ Pre-commit hooks for the Roc language

License

Notifications You must be signed in to change notification settings

Hasnep/pre-commit-roc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pre-commit-roc

Pre-commit hooks for the Roc language.

Usage

Once you've installed the Pre-commit tool and run pre-commit install in your project's repository, you can add the hooks to the .pre-commit-config.yaml file. To pass additional arguments to the Roc CLI, use the args field.

# .pre-commit-config.yaml
repos:
  - repo: https://github.com/hasnep/pre-commit-roc
    rev: main
    hooks:
      - id: check
        name: Check Roc code
        args: [src/main.roc]
      - id: format
        name: Roc Check
      - id: test
        name: Run Roc tests
        args: [src/main.roc]

Then, whenever you make a commit, pre-commit will run roc check, roc format and roc test on your project.