Skip to content

Latest commit

 

History

History
39 lines (31 loc) · 904 Bytes

README.md

File metadata and controls

39 lines (31 loc) · 904 Bytes

pre-commit-run-cmd

WORK IN PROGRESS

Idea:

Run any commands in the environment pre-commit provides. Use additional_dependencies to define the dependencies you need and the args to define the command you want to run.

Example config showing this:

repos:
  - repo: https://github.com/ddanier/pre-commit-run-cmd.git
    rev: v0.1.1
    hooks:
      - id: run-python
        name: "flake8"
        args: ["flake8"]
        additional_dependencies:
          - flake8
        types: [python]
  - repo: https://github.com/ddanier/pre-commit-run-cmd.git
    rev: v0.1.1
    hooks:
      - id: run-node
        name: "eslint"
        args: ["eslint"]
        additional_dependencies:
          - eslint
        types: [javascript]

Note: Currently only python and node are supported.

Feature ideas

  • Allow to change current working directory.
  • Support more languages.