mirror of
https://github.com/anoma/juvix.git
synced 2024-08-16 19:50:26 +03:00
* Closes #2829 * Adds a transformation which converts `br` to `if` when the variable branched on was assigned in the previous instruction. The transformation itself doesn't check liveness and doesn't remove the assignment. Dead code elimination should be run afterwards to remove the assignment. * For Cairo, it only makes sense to convert `br` to `if` for equality comparisons against zero. The assignment before `br` will always become dead after converting `br` to `if`, because we convert to SSA before.
70 lines
1.8 KiB
YAML
70 lines
1.8 KiB
YAML
# $ pip install pre-commit
|
|
# $ pre-commit install
|
|
# $ pre-commit run --all-files
|
|
# See https://pre-commit.com for more information
|
|
# See https://pre-commit.com/hooks.html for more hooks
|
|
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v4.5.0
|
|
hooks:
|
|
- id: check-yaml
|
|
- id: check-added-large-files
|
|
- id: check-case-conflict
|
|
- id: check-merge-conflict
|
|
- id: check-toml
|
|
- id: detect-private-key
|
|
- id: mixed-line-ending
|
|
exclude: tests/
|
|
- id: trailing-whitespace
|
|
exclude: tests/
|
|
- id: end-of-file-fixer
|
|
exclude: tests/|assets/
|
|
|
|
- repo: https://github.com/jumanjihouse/pre-commit-hooks
|
|
rev: 3.0.0
|
|
hooks:
|
|
- id: forbid-binary
|
|
name: forbid binary files
|
|
exclude: assets/
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
rev: v3.0.3
|
|
hooks:
|
|
- id: prettier
|
|
types_or: [css, javascript, markdown, yaml]
|
|
exclude: examples/|tests/|assets/
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
rev: v3.0.3
|
|
hooks:
|
|
- id: prettier
|
|
types_or: [json]
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-clang-format
|
|
rev: v18.1.4
|
|
hooks:
|
|
- id: clang-format
|
|
files: runtime/.+\.(c|h)$
|
|
|
|
- repo: local
|
|
hooks:
|
|
- id: format-juvix-files
|
|
name: format Juvix examples
|
|
entry: make format-juvix-files
|
|
language: system
|
|
verbose: true
|
|
pass_filenames: false
|
|
|
|
- id: typecheck-juvix-examples
|
|
name: typecheck Juvix examples
|
|
entry: make typecheck-juvix-examples
|
|
language: system
|
|
verbose: true
|
|
pass_filenames: false
|
|
|
|
- id: ormolu
|
|
name: format Haskell code with ormolu
|
|
entry: make -s ormolu
|
|
language: system
|
|
pass_filenames: false
|