Skip to content

Commit 9713dd9

Browse files
authored
Workflows (astraly-labs#6)
- cargo fmt for bencher - Added precommit hooks - Replaced udeps with machete (udeps didn't respect selected rust toolchain)
1 parent d999ff9 commit 9713dd9

11 files changed

Lines changed: 74 additions & 365 deletions

File tree

.codespellrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[codespell]
2+
check-hidden =
3+
check-filenames =
4+
skip = .git,Cargo.lock,target,CHANGELOG.md,engine,core,macros,examples,bindings,bin
5+
ignore-words-list = crate,Crate,functio

.github/workflows/lint.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ jobs:
5050
toolchain: nightly
5151
components: rustfmt
5252

53-
- name: install udeps
54-
run: cargo install --git https://github.com/est31/cargo-udeps --locked
55-
- name: cargo udeps
56-
run: cargo +nightly udeps
53+
- name: install machete
54+
run: cargo install cargo-machete
55+
- name: cargo machete
56+
run: cargo machete
5757

5858
codespell:
5959
name: codespell

.pre-commit-config.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
repos:
4+
- repo: local
5+
hooks:
6+
- id: fmt
7+
name: fmt
8+
description: Format files with cargo fmt.
9+
entry: cargo +nightly fmt
10+
language: system
11+
types: [rust]
12+
args: ["--"]
13+
14+
- id: clippy
15+
name: clippy
16+
description: Lint rust sources
17+
entry: cargo clippy --workspace --all-features -- -D warnings
18+
language: system
19+
types: [rust]
20+
pass_filenames: false
21+
22+
- repo: https://github.com/pre-commit/pre-commit-hooks
23+
rev: v3.2.0
24+
hooks:
25+
- id: trailing-whitespace
26+
- id: end-of-file-fixer
27+
- id: check-yaml
28+
- id: check-added-large-files
29+
30+
- repo: https://github.com/bnjbvr/cargo-machete
31+
rev: main
32+
hooks:
33+
- id: cargo-machete
34+
35+
- repo: https://github.com/codespell-project/codespell
36+
rev: v2.4.1
37+
hooks:
38+
- id: codespell

0 commit comments

Comments
 (0)