Skip to content

Commit

Permalink
Add pre-commit hooks for ruff (#629)
Browse files Browse the repository at this point in the history
* Add pre-commit hooks for ruff

* Update readme Developers with pre-commit instructions

* Revert to old ruff instructions, add line about pre-commit

---------

Co-authored-by: Almar Klein <almar@almarklein.org>
  • Loading branch information
claydugo and almarklein authored Oct 23, 2024
1 parent 014ab1b commit c2551b2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.0
hooks:
- id: ruff
args: [ --fix ]
- id: ruff-format
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ This code is distributed under the 2-clause BSD license.
* Or point the `WGPU_LIB_PATH` environment variable to a custom build of `wgpu-native`.
* Use `ruff format` to apply autoformatting.
* Use `ruff check` to check for linting errors.
* Optionally, if you install `pre-commit` hooks with `pre-commit install`, lint fixes and formatting will be automatically applied on `git commit`.


### Updating to a later version of WebGPU or wgpu-native
Expand Down

0 comments on commit c2551b2

Please sign in to comment.