mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 06:18:07 +00:00
ci(core): add rustfmt to style checks
[no changelog]
This commit is contained in:
parent
7832b2f140
commit
c80c8edf70
13
Makefile
13
Makefile
@ -9,9 +9,9 @@ PY_FILES = $(shell find . -type f -name '*.py' | grep -f ./tools/style.py.incl
|
||||
C_FILES = $(shell find . -type f -name '*.[ch]' | grep -f ./tools/style.c.include | grep -v -f ./tools/style.c.exclude )
|
||||
|
||||
|
||||
style_check: pystyle_check cstyle_check changelog_check yaml_check editor_check ## run all style checks (C+Py)
|
||||
style_check: pystyle_check ruststyle_check cstyle_check changelog_check yaml_check editor_check ## run all style checks
|
||||
|
||||
style: pystyle cstyle ## apply all code styles (C+Py)
|
||||
style: pystyle ruststyle cstyle ## apply all code styles (C+Rust+Py)
|
||||
|
||||
pystyle_check: ## run code style check on application sources and tests
|
||||
flake8 --version
|
||||
@ -71,6 +71,15 @@ defs_check: ## check validity of coin definitions and protobuf files
|
||||
python3 common/protob/check.py
|
||||
python3 common/protob/graph.py common/protob/*.proto
|
||||
|
||||
ruststyle:
|
||||
@echo [RUSTFMT]
|
||||
@cd core/embed/rust ; cargo fmt
|
||||
|
||||
ruststyle_check:
|
||||
rustfmt --version
|
||||
@echo [RUSTFMT]
|
||||
@cd core/embed/rust ; cargo fmt -- --check
|
||||
|
||||
## code generation commands:
|
||||
|
||||
mocks: ## generate mock python headers from C modules
|
||||
|
@ -28,6 +28,9 @@ let
|
||||
"thumbv7em-none-eabihf" # TT
|
||||
"thumbv7m-none-eabi" # T1
|
||||
];
|
||||
# we use rustfmt from nixpkgs because it's built with the nighly flag needed for wrap_comments
|
||||
# to use official binary, remove rustfmt from buildInputs below and uncomment next line:
|
||||
# extensions = [ "rustfmt" ];
|
||||
};
|
||||
in
|
||||
with nixpkgs;
|
||||
|
Loading…
Reference in New Issue
Block a user