Skip to content

Commit

Permalink
Merge pull request #106 from Freax13/enhancement/makefile-clippy
Browse files Browse the repository at this point in the history
add clippy target to Makefile
  • Loading branch information
Freax13 authored Dec 28, 2024
2 parents 4574b49 + 5e1fec7 commit a565c15
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 13 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,8 @@ jobs:
common
host
tee
- name: "Check common"
run: cargo clippy --workspace -- -D warnings
working-directory: common
- name: "Check host"
run: cargo clippy --workspace -- -D warnings
working-directory: host
- name: "Check tee"
run: cargo clippy --workspace --exclude example -- -D warnings
working-directory: tee
- name: "Check"
run: make clippy

test-linux:
runs-on: ubuntu-latest
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,14 @@ endif
run-example: all
$(MAKE) -C tee/example run

clippy:
$(MAKE) -C common clippy
$(MAKE) -C host clippy
$(MAKE) -C tee clippy

clean:
$(MAKE) -C common clean
$(MAKE) -C host clean
$(MAKE) -C tee clean

.PHONY: all kernel supervisor-snp supervisor-tdx cli test run verify run-example clean
.PHONY: all kernel supervisor-snp supervisor-tdx cli test run verify run-example clippy clean
5 changes: 4 additions & 1 deletion common/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
default:

clippy:
cargo clippy --workspace -- -D warnings

clean:
cargo clean

.PHONY: default clean
.PHONY: default clippy clean
5 changes: 4 additions & 1 deletion host/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
default:

clippy:
cargo clippy --workspace -- -D warnings

clean:
cargo clean

.PHONY: default clean
.PHONY: default clippy clean
6 changes: 5 additions & 1 deletion tee/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
default:

clippy:
cargo clippy --workspace --exclude example -- -D warnings
cargo clippy -p example -- -D warnings

clean:
cargo clean
$(MAKE) -C example clean

.PHONY: default clean
.PHONY: default clippy clean

0 comments on commit a565c15

Please sign in to comment.