rustwasm / twiggy

Twiggy🌱 is a code size profiler
https://rustwasm.github.io/twiggy
Apache License 2.0
1.29k stars 69 forks source link

Support for Python Pre-Commit hooks #749

Open lexi-the-cute opened 9 months ago

lexi-the-cute commented 9 months ago

💡 Feature Description

Allows testing code before commit. https://pre-commit.com

💻 Example Usage

.pre-commit-config.yaml

# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
-   repo: https://github.com/rustwasm/twiggy
    rev: v3.2.0
    hooks:
    -   id: top
        args = ["-n", "20"]
    -   id: garbage
    -   id: ...

This'd then be used to pass or fail a commit based on if for example, the top code offenders reached above a certain size which can be configured in the config

🙌 Are you interested in implementing this feature?

Add an "X" to one of the following: